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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

FPS Kit | Version 2.0

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

  1. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Hello everyone!

    There is new update for FPS Kit 2.0 coming soon.
    Most requested features was added such as Map Selection, Team Selection, Kills/Deaths counter

    NOTE: Update is not fully finished, but here is Web Player preview Multiplayer v2.5
    (You can also find link at front post)

    Stay tuned for more updates!
     
  2. Luca91

    Luca91

    Joined:
    Apr 13, 2013
    Posts:
    75
    Hello, I have some questions:

    1) Is possible to have a Team DeathMatch example script ?
    2) Is possible to have an example script of how to change server maps (adding the map to the server properties) ?
    3) I noticed (dunno if it is a bug or not) that when the 2nd player join the room, the 1st player have some problems with the crossair.


    EDIT: GREAT ! your last post solved almost 2 of my questions
    EDIT2: But please don't delete the DeathMatch option ! I'd love to have both Deathmatch and Team Deathmatch ;)
     
    Last edited: Apr 29, 2013
  3. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Hi,
    New update will have examples for 1) and 2)

    What about 3) the bug was caused because tag "Remote" was missed.
    That bug was fixed since version 1.3
     
  4. Luca91

    Luca91

    Joined:
    Apr 13, 2013
    Posts:
    75
    I've version 2.0 (bought form unity asset store about 10 days ago), I'm not sure if this is a bug since I tried to edit the scripts to works with multiple scenes. So I've added a _Network prefab with only ConnectMenu Script to my Lobby scene, and another _Network prefab with only Multiplayer Chat and Room Multiplayer Menu Scripts to my map scene, so maybe this bug is caused by my own fault.
     
  5. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Most likely, current version of FPS Kit 2.0 not allow having more than one scene, so I edited quite lot of code to make it work with multiple scenes.

    New version will have splitted prefabs. One for Main Menu and Other for Maps
     
  6. Luca91

    Luca91

    Joined:
    Apr 13, 2013
    Posts:
    75
    Cool, I hope that I'll be able to add the same mods that I have added to the current version (most for ConnectMenu Script).

    Is there any release date for the new version ?

    Many thanks
     
  7. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    I think I will submit new version by the end of this week. Still need to add some planned stuff
     
  8. Ds777

    Ds777

    Joined:
    Apr 30, 2013
    Posts:
    15
    Great, I will buy the pack when is released

    Just found a small bug, When I have the RPG the other player can't see it
    I think this problem worked fine in an older version with the map of mini games (multiplayer)
     
  9. crimn

    crimn

    Joined:
    Jan 8, 2013
    Posts:
    24
    Sorry for the bad English :p

    When sniper scope is ON, the other players can't see when you shoot.
    Make when time end, restart map and not kick all players :),and how to see enemy name when play.
    Crosshair show shoots when gun reloading or is empty.
     
    Last edited: May 1, 2013
  10. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    New version of FPS Kit 2.0 was submitted to Asset Store.
    I will update front post once it approved.
     
  11. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    Wow can you please to tell us what you do new? please tell me you make a Deathmach
     
  12. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    As I said I will update front post with new changes once this version is approved.
    You can check what was added by going to multiplayer preview (link at front post).
    And yes there are 2 game modes, TeamDeathmatch and Deathmatch.
     
  13. roxasguy

    roxasguy

    Joined:
    Nov 19, 2012
    Posts:
    10
    I have a small problem with the Photon View script. I add the photon view to my third person model, but then when I drag the model into the Observe slot, it becomes a UnityEngine.Transform. I need the Observe to be AnimationSync. Here's Pic:

    $pic.png

    Help?
     
  14. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    You need to drag and drop an attached script instead of GameObject
     
  15. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    wow i tested the new version excelent man
     
  16. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    FPS Kit 2.0 - Version 1.4 has been approved to Asset Store.
    Check front post to see what's new.

    NOTE: Some tutorials will be rewrited as they not applying to current version anymore (Might take 1 - 2 days)
     
  17. TheBorDr

    TheBorDr

    Joined:
    Oct 14, 2012
    Posts:
    15
    I am having a bit of a problem. As I am incompetent with Photon cloud, it seems that as I am developing my game, others can connect to it. Someone joined a room while I was configuring a custom weapon. I did some tests, and even with a custom photon ID people from the web player you set up can join a room while I am developing. Any idea what I can do to prevent this?

    Thanks,

    BorDr
     
  18. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    You can change network version to separate other players when you do testings.

    Open ConnectMenu.cs and find this line:

    Code (csharp):
    1. PhotonNetwork.ConnectUsingSettings("v5.7");
    Change "v5.7" to any other string "v5.8" for example than save
     
  19. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
  20. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Drag and drop your particle system into scene and replace default muzzle flash with that one.

    Don't forget to assign new MuzzleFlash object into WeaponScript.js variable

    When its done just save Player prefab back
     
  21. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    Ok i do it but i dont see it when i fire why?
     
  22. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    WeaponScript.js only activates Muzzle Flash game object for small amount of time (0.1 seconds)
    So you need to make sure your muzzle flash always visible while its activated, otherwise it will not work
     
  23. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    ok now i see it but the muzzle flash rotate
     
  24. skullptor

    skullptor

    Joined:
    Nov 2, 2012
    Posts:
    48
    Hi,
    It's possible to have more than one character in the game?
    or at least, use the same model, but be able to use various textures?

    if not, any suggestions on how to create this?
     
  25. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    me two im interesating at this
     
  26. skullptor

    skullptor

    Joined:
    Nov 2, 2012
    Posts:
    48
    Hi NS
    I installed the new update but I have two errors here:

    NullReferenceException: Object reference not set to an instance of an object
    RoomMultiplayerMenu.Awake () (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/Network C#/RoomMultiplayerMenu.cs:102)


    and


    NullReferenceException: Object reference not set to an instance of an object
    RoomMultiplayerMenu+<RoundEnded>c__IteratorD.MoveNext () (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/Network C#/RoomMultiplayerMenu.cs:216)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    RoomMultiplayerMenu:FixedUpdate() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/Network C#/RoomMultiplayerMenu.cs:202)

    what I have to do? :(
     
  27. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Hi,
    FPS Kit 2.0 is not programmed to switch player model.
    But good thing you have all source codes which you can modify to make it fit your needs.
    Basically you can create new script and write a code to deactivate one player mesh and activate other
     
  28. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Hi,

    Seems like you hit Play button while you had map scene opened.

    To make it work correctly you need always start Play mode from MainMenu scene which contains __Lobby prefab
     
  29. skullptor

    skullptor

    Joined:
    Nov 2, 2012
    Posts:
    48
    hi,

    thanks, now it works :D


    There's some kind of incompatibility with playmaker?
    after I install it, a lot of error appeared at same time:

    Assets/FPS Kit Version 2.0/Photon Unity Networking/Plugins/PhotonNetwork/PingCloudRegions.cs(15,12): error CS0246: The type or namespace name `CloudServerRegion' could not be found. Are you missing a using directive or an assembly reference?

    Assets/FPS Kit Version 2.0/Photon Unity Networking/Plugins/PhotonNetwork/PingCloudRegions.cs(38,39): error CS0246: The type or namespace name `CloudServerRegion' could not be found. Are you missing a using directive or an assembly reference?

    Assets/FPS Kit Version 2.0/Photon Unity Networking/Plugins/PhotonNetwork/PingCloudRegions.cs(75,28): error CS0246: The type or namespace name `CloudServerRegion' could not be found. Are you missing a using directive or an assembly reference?

    Assets/FPS Kit Version 2.0/Photon Unity Networking/Plugins/PhotonNetwork/PingCloudRegions.cs(133,35): error CS0246: The type or namespace name `CloudServerRegion' could not be found. Are you missing a using directive or an assembly reference?

    Error while reading window layout: window #15 is null
    UnityEditor.WindowLayout:LoadWindowLayout(String)

    Failed to load window layout: System.Exception: Exception of type 'System.Exception' was thrown.
    at UnityEditor.WindowLayout.LoadWindowLayout (System.String path) [0x00000] in <filename unknown>:0
    UnityEditor.WindowLayout:LoadWindowLayout(String)
     
  30. aeditz50

    aeditz50

    Joined:
    Dec 18, 2012
    Posts:
    10
    How do you change the weapons that the player has?
    And how can you change the appearance of those bars that show you what guns you have?
     
  31. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Probably PlayMaker have files that are named the same as in FPS Kit 2.0.

    Or some script in PlayMaker have classes named the same (which is most likely caused the problem).

    The only way to fix it is manually open scripts with errors and see where the problem.

    Just double click on error in console and Unity will bring you to conflicted lines in script
     
  32. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    NetworkPlayer have one of child objects that called WeaponManager with WeaponManager.js attached.

    It controlls the weapons player have

    To change GUI you will have manually edit code
     
  33. aeditz50

    aeditz50

    Joined:
    Dec 18, 2012
    Posts:
    10
    Last edited: May 6, 2013
  34. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Oh I mean WeaponManager is not exactly a child object of NetworkPlayer.

    Drag and drop NetworkPlayer to scene and expand LookObject till you find WeaponManager (it located under WeaponCamera)

    What about error, you probably need to contact Asset Store support to resolve it
     
  35. aeditz50

    aeditz50

    Joined:
    Dec 18, 2012
    Posts:
    10

    Once i dropped the NetworkPlayer down my Unity stops responding and it stays like that until i end it.
     
  36. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Something probably wrong with your project or Editor

    You can do various thing to solve it

    - Reinstall Unity

    - Reimport whole project by Right Click on Asset Folder and select Reimport

    - Download latest version of FPS Kit 2.0 (Note: It works only with Unity 4)
     
  37. aeditz50

    aeditz50

    Joined:
    Dec 18, 2012
    Posts:
    10
    1.I wont reinstall unity as i it takes a long time.
    2.I already did that.
    3.I'ts not possible for me to do this , because of the error i showed you before , i tried contacting the asset store help service but the verification email that i got never came , or any kind of mail from them.
    This is just a suggestion but if i gave you my email could you send the project? It's ok if you say no , ill just keep on trying contacting them.

    Cheers
     
  38. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,391
    The problem is Playmaker also includes Photon Networking but puts it in the assets root, so you have 2 Photon Networking folders. Just delete one of the Photon Unity Networking directories and you should be good to go...
     
  39. Goofy420

    Goofy420

    Joined:
    Apr 27, 2013
    Posts:
    248
    Let me know when there's a 50% sale like Playmaker update has.
     
  40. aeditz50

    aeditz50

    Joined:
    Dec 18, 2012
    Posts:
    10
    Is it possible to change the fps player?
    By that i mean that i have my own prefab but once i put it in the place of the networkplayer then i click on the "create room" button and it doesnt do anything.
     
  41. skullptor

    skullptor

    Joined:
    Nov 2, 2012
    Posts:
    48
    thanks alex and ns!

    now it's working fine :D
     
  42. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    Could you give me an advise please, which is the best way to add kills and deaths to mysql? i see you have all in a hashtable...thank you!
     
  43. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Kills/Deaths are converted to Hashtable to be able to save into Photon room custom properties.

    You don't need to touch that if you want save stats into MySQL database.

    Instead you need to write custom PHP script which will receive number of kills deaths and will save it into table.
     
  44. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    So, i understand it, but how can i know if it's a number of kills of this player, how can i check it to avoid any mistakes, can i do it with view id? and 1 more question, how can i fix a crazy movement of granade?
     
    Last edited: May 7, 2013
  45. Luca91

    Luca91

    Joined:
    Apr 13, 2013
    Posts:
    75
    Hello, I dunno if it is an error from my end, but 1 out of 5 times, when I create a room, I auto win the round (it seems that the round timer fail to be read)

    EDIT: the problem is caused by "roundDuration - ((float)PhotonNetwork.time - referenceTime)" that return 0. How to fix this ? Thanks
     
    Last edited: May 8, 2013
  46. aeditz50

    aeditz50

    Joined:
    Dec 18, 2012
    Posts:
    10
    Is it possible to change the fps player?
    By that i mean that i have my own FPS System/Prefab and i want to use it instead of yours , but whenever i change it and start the game , i create a room , i choose a team but then that's where nothing happens.
     
  47. Luca91

    Luca91

    Joined:
    Apr 13, 2013
    Posts:
    75
    Hello I fixed the issue :) It was a lag problem, and I fixed editing those lines :

    Line 262:
    in:
    Line 123:
    in:
    Then this line:
    in:

    That's all mates, now FPS KIT 2.0 MP works on slow connections TOO ! :)
     
  48. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    494
    Sure you can use your own FPS prefab, but you need or setup your player using same components as example prefab or manually edit multiplayer system to work with your code.


    Hey,

    Good solution and thanks for sharing it here

    Cheers!
     
  49. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    How i can when i fire on the head of the player to tell me HEADSHOT?
     
  50. aeditz50

    aeditz50

    Joined:
    Dec 18, 2012
    Posts:
    10
    Hi again , i have my own Login/Register script , how could i add levels?
     
unityunity