Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FPS Kit | Version 2.0

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

  1. exgengames

    exgengames

    Joined:
    Aug 10, 2012
    Posts:
    31
    pixmah you want to join in my studios ?

    y working wi team deathmach zombie mode


    and creator

    look this y have bug in the layer

    y nee to add weapon the layer lost

     
  2. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    yes i want to join
     
  3. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    There should be layer called - Weapon
     
  4. exgengames

    exgengames

    Joined:
    Aug 10, 2012
    Posts:
    31
    solo have 4 layer default transparent Fx ignore Raycast and water dont apear weapons D:


    Look





    here is my skype : Exgengames
     
  5. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You need to manually add layer called Weapon
    Check this: http://docs.unity3d.com/Documentation/Components/Layers.html

    Also I think package wasnt imported correctly, you can fix that by removing current package and reimporting it again
     
  6. CHHOST

    CHHOST

    Joined:
    Oct 1, 2012
    Posts:
    7
    I have an issue.

    When i play more then one player, i get serius FPS lag. like 10 fps otherwise it runs smooth.
     
  7. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Did you run 2 windows on same PC, if so, opening 2 or more game instances on same PC cause fps decrease
     
  8. CHHOST

    CHHOST

    Joined:
    Oct 1, 2012
    Posts:
    7
    no i did not. I played on my local machine and my friend played on his (at his place). i had massive fps lag then my friend had.

    It first seemed to be the one who created the server, but it wasnt always true.
     
  9. exgengames

    exgengames

    Joined:
    Aug 10, 2012
    Posts:
    31

    your need optimize now my game working 60 fps

    my pc have 128 of Video :cool:
     
  10. CHHOST

    CHHOST

    Joined:
    Oct 1, 2012
    Posts:
    7
    Well its only where there is more players online, if i play ot alone i get good 60 + fps. Bit the moment another player joins it dips to -5 fps.

    I have a 6950 2 gb so it should not be an issue :)

    Must be an error with the code or something i missed.
     
  11. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Make sure your project contain tag called - Remote. No need to tag nothing just check if its inside tag list.
    Also to make sure there is no errors, play from editor and not from builded version.
     
  12. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    Because i only want to explain if someone is listening.
    I dont need any help for now. Im sorry :(
    Im making a singleplayer game now with it.

    I'll publish it later in the showcase (in the future)
     
  13. alex1560

    alex1560

    Joined:
    Sep 3, 2012
    Posts:
    15
    Hey guys.. what variable control the bullet direction ? I've created a new sniper class like the machinegun one, but I can't get the bullet hit the same spot when aiming.. I think there is a random value generated.. but don't have any ideas which does that.. any pointers ? thanks for your help.

    Btw, there is a lot of potential in this script..

    Keep up the good work!
     
    Last edited: Jan 3, 2013
  14. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @ NSdesignGames

    any idea or sample on how to create SCOREBOARD? number of kills and deaths i want to see on the scoreboard when pressing a key..
     
  15. exgengames

    exgengames

    Joined:
    Aug 10, 2012
    Posts:
    31
    the layers dont apear and locked to edit help me please
     
  16. alex1560

    alex1560

    Joined:
    Sep 3, 2012
    Posts:
    15
    Solved the issue with the accuracy.. in the script, I guess he forgot to add if functions for each weapon, and there was just a single option on the error angle if aimed.. I've solved the issue by adding if(GunType == gunType.MACHINE_GUN){ } for each gun type.. instead of MACHINE_GUN, you add the game type ..

    Whatsoever, I've got another issue now that I am trying to solve.. the machine gun is not firing continuously, I've deactivated the single fire option, but I guess that I need to create a while function when the mouse button is pressed..

    It's strange though that in the demo it shoots continuously... also I've had the problem that when I was pressing CTRL, it was laying flat on the ground, but shooting as well.. so I've changed the Fire1 function to GetMouseButtonDown(0) for firing..

    I am using unity4... that can be my issue ?

    I will keep you posted..
     
    Last edited: Jan 4, 2013
  17. alex1560

    alex1560

    Joined:
    Sep 3, 2012
    Posts:
    15
    Problem solved.. instead of GetMouseButtonDown, I've used GetMouseButton..

    Cheers..
     
  18. wackyracer3

    wackyracer3

    Joined:
    Jan 5, 2013
    Posts:
    14
    Correct me if I am wrong, but you said to make a new layer called Weapon so that your weapon won't go through objects? I created my own "Weapon" layer and it's literally nothing different from having the Default layer. Am I doing something wrong? My weapon keeps going through objects when I go close to them, and the weapons that are in the example don't. They seem to have a Layer that doesn't say anything, it's just blank like exgengames said up above.

    The weapon in the example have this as their layer:

    I can't make my weapon have the same layer as the examples like in the image above. Like I said before, I made my own "Weapon" layer and nothing changed at all. It still goes through the walls when I walk up to them and stuff. If I change the example guns to my new "Weapon" layer, it messes them up and they go through the walls also. What am I doing wrong? I am obviously not grasping something correctly here.

    EDIT: I am using Unity 4, if that helps at all.
     
    Last edited: Jan 5, 2013
  19. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You missed one step, after assigning that layer to weapon, go to MainCamera and Uncheck that layer from camera culling mask. And make sure same layer is checked in WeaponCamera.
     
  20. wackyracer3

    wackyracer3

    Joined:
    Jan 5, 2013
    Posts:
    14
    So I am supposed to un-check the Weapon layer from Main Camera's culling mask, then check the layer in Weapon Camera's culling mask? I did that, and it chopped my weapon model in half, literally. It only shows the first half of the model. It's like it's going through an invisible wall 24/7. Is the positioning of the gun off? Does it need to be closer? :S
     
  21. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Means that weapon model is too big, you can either scale it down a bit or increase far clip plane value for WeaponCamera
     
  22. wackyracer3

    wackyracer3

    Joined:
    Jan 5, 2013
    Posts:
    14
    Awesome that fixed it! Since you're already here, I have another small question to ask you about animations.

    The gun models that I am using have many different types of animations. For example, instead of just having the basic 5 you have in the kit (Idle, Fire, Reload, TakeIn, TakeOut), I have animations for Starting To Fire, Firing, and Ending Fire, etc. I also have special animations for aiming down sights, but your kit uses a different method for aiming down sights for a gun (The Aim Properties).

    How would I be able to use those other animations that my gun models have?
     
  23. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    To be able use those kind of animation you will need to modify defaul WeaponAnimation script (or write new one), same for aiming. If you want to aim with animation instead of scripted movement, you will have to remove aiming part from WeaponScript.js and add your own instead.
     
  24. wackyracer3

    wackyracer3

    Joined:
    Jan 5, 2013
    Posts:
    14
    Okay, I understand. I had a feeling that was the case. One last question. In the Bunker Multiplayer scene, there are animated characters, and a little different setup for the characters themselves, like more weapons. I can't find the ExampleCharacter prefab anywhere in the Hierarchy for that scene. I just wanted to see how you animated the characters with this kit and stuff. Is there a way to see those kinds of things in the hierarchy?
     
  25. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    ExampleCharacter its a prefab which is spawned in scene at runtime. So search it in Project files.
     
  26. CHHOST

    CHHOST

    Joined:
    Oct 1, 2012
    Posts:
    7
    how would i give an NPC health, so if i shoot in mutliplayer he will die? is there an easy implementation of the hp script?
     
  27. domwhu777

    domwhu777

    Joined:
    Jan 2, 2013
    Posts:
    4
    How easy is it to have team in your package if it isnt can u please make an update making it easier.
     
  28. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    I was able to implement it in about 3 minutes. SO easy.
     
  29. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    I cant seem to get 3rd person models working.

    I have my weapon which works great. And using weaponsynce(Catcher)JS and I set-up thirdperson model and add it into weaponsync yet when I use the weapon other players cant see it. Neither of the models use animations but that shouldn't be a problem. Am I missing an important step your tutorial doesnt cover? Is there a tag or layer or another variable I need to add?

    Also a very rare bug where animations just wont play on certain players but work when they re-join. Any idea what that is?
     
  30. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Have you assigned ThirdPersonWeapon variable in each WeaponSync(Catcher)JS ?
     
  31. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    In my first person model of the gun, I have assigned the variable of the thirdperson weapon in WeaponSync(Catcher)JS like the tutorial says.
     
  32. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    And what about PlayerLocationSync.cs which is located on player root. Did you assigned everything as it was in example character?
     
  33. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    In the tutorial it says to put third person weapons into local objects to deactivate but the examples don't have it. I have tried both having it in there and not having it there and neither work. Is the third person model allowed to have Game Objects in its hierarchy? I can screen cap my set-up if you want.
     
  34. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    That´s might be the problem, example character have third person weapons which are dont have any hierarchy.
    The only weapon with child objects is RPG but it have custom implementation, you can setup all weapons with child objects using that method.
     
  35. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    Okay I double checked everything and even checked it out in scene view while the game was running. The object simply isnt turning on. If I manually turn it on it appears all good. But It just isnt working. I'm absolutely lost on what I should do. Thanks for the fast responses btw.
     
  36. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    When you drop your character prefab into oscene, can you see all first person and third person weapons, or they are deactivated? If so, make sure every object in the hierarchy is activated than save prefab.
    And what version of FPS Kit 2.0 and Unity 3D you using? All versions before 1.3 wasnt compatible with Unity 4.
     
  37. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    All objects are activated and good. I assume I am using the most up to date as I only got it a day ago and it is working great with unity 4 for me. So should third person weapons be in local objects to deactivate or not?
     
  38. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Well if they are not assigned in ExampleCharacter than it shouldnt be assigned in your.
    Also while you playing, check console for errors, when something dont work I am almost sure it will show some error.
     
  39. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    Yea that's the problem. There are no errors in the console that's how I know its something I did wrong. I just have no idea.
     
  40. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    So you checked for errors when there was other player connected with no weapon visible?
     
  41. johny

    johny

    Joined:
    Aug 31, 2011
    Posts:
    133
    Hey I fixed the issue and it was as I expected me being and idiot. I did 2 things to fix it. First thing was I renamed "Third Person Weapons" to "ThirdPersonWeapons" and (I think this is the most important thing) I had a 1 letter difference between what I named the first person view gun and the third person view gun.

    Thanks for the help NSdesign, this is an awesome package.
     
  42. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Glad you solved the problem.
    Cheers!
     
  43. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @NSdesignGames ...... is there a way on how to add a game mode like Team Deathmatch and Zombie Survival???
     
  44. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    I have some errors(In the script editor, when i used a debug) , i think it's happen because of new Unity3d GUI update...i can't match the buttons after i connect to the cloud...so, i fix some errors in the multiplayer menu script, and now i think, i need just fix the GUI system, but i don't understand what is wrong, can you help me? just say what is may be?
    Thank you!
     
  45. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    I guess you using old version of FPS Kit 2.0 which wasnt compatible with Unity 4 and had bug when buttons didnt responded to click.
    In latest version that bug is fixed, so GUI buttons respong correctly inside Unity 4.
     
  46. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    So, the bug is consists in GUI? thank you...yes, i use old version, i want to fix the bags, because i have a lot of my own code there...
     
  47. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Well just download latest version, import it to a new project and replace old RoomMultiplayerMenu.cs with new one
     
  48. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    well, i can't download something for now, i am not in native country....i see the unity script reference, and i don't know, everything is correct
     
  49. cyno

    cyno

    Joined:
    Jan 8, 2013
    Posts:
    1
    hi, i have the same problem and i need the file "RoomMultiplayerMenu.cs" from the new version (1.3) of the fps toolkit that is compatible with unity4.

    please can someone give me a link to this file that i only need.

    Thanx in advance.
     
  50. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    Hi NSdesignGames Developer(s),
    I have a question about this FPS Kit 2.0
    I've send a email to you. Please read it.