Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

FPS Kit | Version 2.0

Discussion in 'Assets and Asset Store' started by NSdesignGames, Oct 2, 2012.

  1. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Thought I'd post my progress on the C# conversion.
    Got most of the core classes converted (a few helper JS files still around, not sure I care about those). That includes FPScontroller and WeaponSystem, all pure C# now.
    Now working on fixing up script references. Oh what fun ;)

    EDIT: YAY! I've now ported most of FPS kit over to C# and it works!
    Haven't tested single player mode, as I'm mostly concerned with multiplayer (the entire reason I bought the kit, actually)
     
    Last edited: Nov 26, 2013
  2. reaperkan

    reaperkan

    Joined:
    Aug 5, 2013
    Posts:
    15
    How can we we add the Bomb planting mode? and well do you guys know any PHP websites for creating database?
     
  3. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I would say make the bomb be a weapon which can be picked up. You'd probably have to add some special case logic to the weapon script which allows you to check whether or not the bomb is being planted on a bomb site (you might even add a new weapon type for the bomb).
     
  4. reaperkan

    reaperkan

    Joined:
    Aug 5, 2013
    Posts:
    15
    Does anyone have any freaking tutorials of adding new guns to it. THERE IS NO EXAMPLE PREFAB IN THIS :mad:
     
  5. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Well, to make a new gun with just the existing scripts, take a look at any of the included demo weapons (that should pretty much be all you need).
     
  6. reaperkan

    reaperkan

    Joined:
    Aug 5, 2013
    Posts:
    15
    How can i add a password protection of hosted games to this?
     
  7. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Don't think you can. Photon Cloud doesn't support password protection. It does support somewhat private rooms, however (room is hidden from lobby, so players would directly enter room name to join)
     
  8. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Currently working on integrating DF-GUI with FPS Kit.
    Added a pulsing "tunnel vision" effect which fades in starting at 30 HP or less.
    This is the resulting "ZOMG YOU'RE ABOUT TO DIE DUDE GET A MEDKIT" effect when you're running around on 1 HP :D
    $NearDeathTunnelVision.png
     
  9. reaperkan

    reaperkan

    Joined:
    Aug 5, 2013
    Posts:
    15
    @Phobic looks good

    Can i assign specific damage of guns ?
     
  10. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    So far as I can tell, damage is defined in the bullet object. Looks like you would need to make one bullet prefab per gun (or modify the WeaponScript to allow you to assign damage to the bullet)
     
  11. Steve-of-Construction

    Steve-of-Construction

    Joined:
    Jan 26, 2013
    Posts:
    67
    Hey guys,


    please can someone help?
    I've tried a lot incl. the tutorials but still couldn't figure out how to setup another player model.
    What I've got is a Mixamo-auto rigged model and tried to get this one into game.

    In editor the animations from FPS-Kit soldier work and look fine on the new model but I can't get it running in game.
    The problem is that FPS-Kit soldier ist set to legacy and I must set the new model to humanoid to see the animations in editor.
    But in game: nothing, no moves at all the model just moves around without animations.

    If the FPS-Kit soldier is set to humanoid I get 'must be marked as legacy' and some more errors.
    How could I setup the new model - wich is without animations - to use the FPS-Kit animations or some other animations without changing the whole code?

    Any help is appreciated.



    FPS soldier legacy - new model legacy = nothing cause different 'body/bone names'
    FPS soldier legacy - new model humanoid = no animations in game but in editor
    FPS soldier humanoid - new model humanoid = 'must be marked as legacy' error
     
  12. reaperkan

    reaperkan

    Joined:
    Aug 5, 2013
    Posts:
    15
    Also this cannot play the animations when it goes into scope mode ..... *sigh*
     
  13. allpay

    allpay

    Joined:
    Mar 28, 2012
    Posts:
    31
    Hi, sometimes I am getting that error:

    UnityEngine.Transform.get_position () (at C:/BuildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/Editor/UnityEngineTransform.cs:26)

    Any idea what does it want to tell me? what should I do?

    Solved:
    reason: null spawn points at lobby prefab
     
    Last edited: Dec 3, 2013
  14. Ds777

    Ds777

    Joined:
    Apr 30, 2013
    Posts:
    15
    I was able to add the zombie model and animations (.anim) from Mixamo to Fps kit but I have not tried the auto rigged.
     
  15. worldofcars

    worldofcars

    Joined:
    Jul 21, 2012
    Posts:
    20
    Hello guys.

    I am working for a few months with this FPS Kit and everything worked fine until yesterday when I wanted to replace the soldier model with my own animated soldier model. I have followed every step in the tutorials on how to setup a new character and almost everything is working, except of the animations. They are not playing over network. Everything is assigned correclty (I have re-followed the tutorials 3 times) but the animations will not play.

    Why? I am not getting any error messages when I test it with build and editor. Does anyone have an idea where might be the problem?
    Thank you in advance!
     
  16. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Make sure you've assigned animations to CharacterAnimation.js script:
    $u1.jpg
     
  17. worldofcars

    worldofcars

    Joined:
    Jul 21, 2012
    Posts:
    20
    All animations are assigned correctly
     
  18. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    What about animation component?

    Edit. Model should be in legacy mode. Check NSdesignGames post on page 36
     
    Last edited: Dec 6, 2013
  19. worldofcars

    worldofcars

    Joined:
    Jul 21, 2012
    Posts:
    20
    There is an anmation component with all the animations. The Model is also in legcy mode.

    Problem is still not solved:(
     
  20. worldofcars

    worldofcars

    Joined:
    Jul 21, 2012
    Posts:
    20
    Yes I have seen that post and I have done already everything that he said in the post. The problem is still not solved:(
     
  21. reaperkan

    reaperkan

    Joined:
    Aug 5, 2013
    Posts:
    15
    Can i get a tutorial on adding new game modes?
     
  22. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    There is a bug when your FPS drops down to 40 and below... the weapon does not sync will with the camera and its not smooth..
     
  23. Ds777

    Ds777

    Joined:
    Apr 30, 2013
    Posts:
    15
    You solved the problem? Several months ago I added a zombie without problems, but now I try with another character and does not work (same as you describe)
    The problem is probably the newer .anim of Mixamo, only the old .anim/model works.
     
  24. ColtonG

    ColtonG

    Joined:
    Aug 9, 2013
    Posts:
    2
    Okay there is like a simple problem I cannot seem to find a solution to and I think its really simple but im stumped on figuring it out, and its probably going to make me feel stupid when someone answers me but here is the problem...

    I wanted to see what the base was like for the assets and tried using the multiplayer scene. I set my photon cloud information like my appid and such, but when I go to load the game by clicking the button "Spawn", nothing happens. Actually, clicking any buttons on the main-menu of that scene does nothing, doesn't change the quality, the control button does nothing, etc.. But when I go to the single player scene that main menu works fine, in summary my question is, what am I doing wrong that's not allowing me to run the multiplayer scenes correctly? seeing as they aren't wanting to work with my photon server or there is a code issue I'm not aware of... Please help :(
     
  25. Ds777

    Ds777

    Joined:
    Apr 30, 2013
    Posts:
    15
    Problem solved, I had to change all code of animations to make it work with mecanim, This project should be updated to mecanim or may no longer work in future versions of unity.
     
  26. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I encountered this too. Turns out it's a bug in the way Unity handles which control has input focus. Whenever a new chat message is posted, or an old one removed, the number of controls drawn is changed - so the index of the textbox changes, and therefore Unity thinks a different control should have focus (what usually happens is that the index doesn't exist anymore, so Unity changes focus to the textbox again, which causes the entire text to be selected, and if you're in the middle of typing that means you accidentally overwrite the text)
    Don't know how to solve it. I was working on switching over to DFGUI, which doesn't have that issue.
     
  27. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Hey everyone,

    I am temporary back to release new update for FPS Kit 2.0.
    New version will have all JS converted to C# so no language mixing anymore.
    It will also contain chat bug fix and script optimizations for better performance.
    New update is planned to release next week

    Stay Tuned!

    EDIT: Also it will have most resent version of Photon Cloud plugin
     
    Last edited: Jan 5, 2014
  28. Braindog

    Braindog

    Joined:
    Sep 15, 2012
    Posts:
    8
    Is it possible to insert Falldamage?
     
  29. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Yea I might add it aswell
     
  30. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    cant wait for the new update!
     
  31. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    Please add login script
     
  32. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I disagree. Photon doesn't support login, and if you need it you can always add it yourself with a third-party library (like Hydra).
     
  33. Totals

    Totals

    Joined:
    Nov 27, 2013
    Posts:
    22
    How do you set what weapons your players start with in multiplayer?

    Edit: I'll prob wait till you make all scripts C# next week, but if thats something not directly controlled by a script at the moment where are you setting it so all weapons are held by the player at the beggining so I could possibly code it into that script.
     
  34. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Hey,
    You can change weapons player start with by rescaling array at WeaponManager.js which is assigned to gameObject named "WeaponManager"
     
  35. BossRockers14

    BossRockers14

    Joined:
    Jul 23, 2013
    Posts:
    33
    Hey guys i have a question . i recently change my characters and went good so far , but the animations wont play :( i use animations from mixamo (soldier animation) different fbx file with animation files , i drag the animation file in the animation script but as soon as i play the animation cannot be located ? is there a way that i can merge all the animations together in a single fbx file? like the default exmaple soldier.fbx have? so that it can detect my animations ??? thanks for the reply :)
     
  36. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    Code (csharp):
    1.     //Switch to next weapon
    2.     if(Input.GetAxis("Mouse ScrollWheel")>0  canSwitch){
    3.         if(index < allWeapons.Count-1){
    4.             SwitchWeapons(allWeapons[index].gameObject, allWeapons[index+1].gameObject);
    5.             index++;
    6.         }else{
    7.             SwitchWeapons(allWeapons[allWeapons.Count-1].gameObject, allWeapons[0].gameObject);
    8.             index=0;
    9.         }
    10.     }
    11.    
    12.     //Switch to previous weapon
    13.     if(Input.GetAxis("Mouse ScrollWheel")<0  canSwitch){
    14.         if(index > 0){
    15.             SwitchWeapons(allWeapons[index].gameObject, allWeapons[index-1].gameObject);
    16.             index--;
    17.         }else{
    18.             SwitchWeapons(allWeapons[0].gameObject, allWeapons[allWeapons.Count-1].gameObject);
    19.             index=allWeapons.Count-1;
    20.         }
    21.     }  
    22. }
    Replace lines 40 to 61 of the WeaponManager.js with this to change weapons with the mouse wheel instead of the 1 and 2 buttons
     
  37. Ds777

    Ds777

    Joined:
    Apr 30, 2013
    Posts:
    15
    Do not waste anymore time will not work, since this kit does not support the new animations/models of mecanim.
     
  38. BossRockers14

    BossRockers14

    Joined:
    Jul 23, 2013
    Posts:
    33
    well thats too bad really :( i hope this will be fixed in the next patch and i wonder how Stan B. Implement his new character animations did he use the default animations and just changed the model?
     
  39. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    If you change the rig type to Legacy in the import settings for the model it should work (by default it imports things as Mecanim animations)
     
  40. FPSG

    FPSG

    Joined:
    Jan 8, 2014
    Posts:
    18
    Ideas replacing the default character player model to a new one i got? and how to add/make maps which goes under the game modes options? Thanks :D
     
  41. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    You can't, really. It's possible in very simple cases, but in something like this (lots and lots of interdependant JS scripts) there's really no point in trying. In my own case I ended up converting the entire project to C# (rewrote all of the scripts). I handed my progress off to NSDesign, and I hear the next update will have everything converted to C#.
     
  42. FPSG

    FPSG

    Joined:
    Jan 8, 2014
    Posts:
    18
    Its not possible changing the default character model of FPS Kit?
     
  43. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Of course it's possible.
    The first post should have a link to a tutorial iirc.
     
  44. FPSG

    FPSG

    Joined:
    Jan 8, 2014
    Posts:
    18
    Thanks :D! lol i thought it was for 3rd person view, thanks man <3
     
  45. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    It is for 3rd person view.
    To change the first person view, you have to supply your own weapon models (the arms are part of the weapon model)
     
  46. FPSG

    FPSG

    Joined:
    Jan 8, 2014
    Posts:
    18
    Oh but isn't the default as first person? or to change the model, it has to be done with 3rd person view and then changing it to first person? Can't the soldier just be removed and placing the new character making it use the soldier animations:D
     
  47. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    First and third person view are two different things. If you only care about first person (singleplayer) you don't have to bother with the third person character - instead you'll need to supply your own weapon models.
     
  48. FPSG

    FPSG

    Joined:
    Jan 8, 2014
    Posts:
    18
    o_O, hmm I do want it for multiplayer, http://warmerise.com/FPSKit/2.0.html want to change that character model. I think i got mixed up xD. I thought first person is that where you can only see your gun and arms and third where you can see your whole character from back :p. I will give the changing character tutorial a shot =) thanks!
     
  49. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Thank you PhobicGunner for helping me with uSpeak integration(voice chat solution).
    As I mentioned before in the users review I'm really impressed with the quality and value of this asset.

    Link to the asset:
    https://www.assetstore.unity3d.com/#/content/4639

    You can try it in my TNet integration project(press "V" to speak):
    http://exposedconflict.com/unity/TNet.html

    I've implemented it for TNet, but it can be easily integrated with Photon as well.
     
    Last edited: Jan 13, 2014
  50. Smartline-Games

    Smartline-Games

    Joined:
    Aug 15, 2013
    Posts:
    67

    One more reason to stay tuned and maybe to buy this asset this year. It's on my wishlist ^_^
     
unityunity