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. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey, PlayerDamage script (Which is assigned to NetworkPlayer prefab) have list called Hit Boxes. If you expand it you will see that each hitbox that is assigned have its own damage value, in our case the box with highest damage value located on player head.
    Check "Setup 3rd Person Character for Multiplayer" tutorial (its on front post), to see how its done
     
  2. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    How is possible when you create room to have more maps to select?
     
  3. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey, yes its possible. It require custom code implementation.
    Note: You can do whatever you want inside Unity, your possibilities depend on you programming knowledge.
    To expand you knowledge in Photon, I suggest you to go to their website and check Documentation

    http://doc.exitgames.com/photon-cloud/
     
  4. skullptor

    skullptor

    Joined:
    Nov 2, 2012
    Posts:
    48
    Hi NSgames, it's me again :)

    An annoying bug is happening here.
    sometimes the right mouse button stop working, and at same time, the enemy animations stop working too, so I see a frozen enemy running and also, some of my weapons shows the shot fx frozen forever.
    it happens sometimes with player 1 and sometimes with player 2
    I can't detect what causes this problem.
    It happened before I change anything in game.

    here goes my test:
    www.exiliorock.com.br/shooter/shooter.html

    If you want, I can go there to test with you now
     
  5. AlcatrazAlex

    AlcatrazAlex

    Joined:
    Aug 6, 2012
    Posts:
    83
    Thanks.. But i have error with your system.


    How to fix this? This error was when i buy it.

    In Script PlayerLocationSync. in line 73:
    And i have some bags with another players positions.

    Thanks in advance.
     
  6. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    You have the exact same problem as me. However me and NSGames has found the fix. You need to add a "Remote" tag in your tags. This will fix your problem.
     
  7. skullptor

    skullptor

    Joined:
    Nov 2, 2012
    Posts:
    48
    I created a Remote tag.
    I need do associate it to an object or just create a tag and it's done? :)
     
  8. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    @Alcatrazer123
    Did you setup Your personal Photon ID before starting multiplayer example?
    If not, go to Photon Cloud website, register there, copy your personal ID and then paste it into Unity photon pannel - it located under Window tab than save.
     
    Last edited: Nov 6, 2012
  9. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Yea, just add Remote tag to tag list
     
  10. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    I'm having some trouble setting up Character Animations for other players. For some reason even if I follow your tutorial, it doesn't want to play any animations. It also doesn't want to change weapon (show the weapon), even though it's sync'd and I can see the bullets firing and the bullet holes. This is on my own model, not the Soldier Model that comes with FPS Kit 2.0

    Any ideas what is causing this problem? Are we missing something again?

    Cheers,
     
  11. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Does it give you some errors if you connect to created room from Editor?
     
  12. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Also make sure you followed step 6, communication objects are very important and need to be assigned to your new character
    Tutorial link (I guess its same you have but anyway) http://www.mediafire.com/view/?0wysaw6wrfdq4ib
     
  13. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    The only error i was getting was because I haven't set up any hitboxes, however I've set one up, changed the size to 1 and it still does it. The communication objects is set up. Is there anything else?

    Cheers,
     
  14. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Could you show the error?
     
  15. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    I fixed the error. It's because I didn't set up any hitboxes on my character. However this didn't fix my problem.
     
  16. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Do next experiment, make a build, run it, create room. Connect to this room from editor, spawn both players and check editor console if there is any errors also check remote characters in editor if Character animation script dont have any missed component, also did you assigned Character Animations script into Remote Script To Deactivate list?
     
  17. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi NSdesignGames

    Just wondering when the full-featured documentations will be ready? Are you planning to do some video tutorials? please I want to start my project

    Thanks
     
  18. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    I'm getting an error:

    Seems to be:

    Code (csharp):
    1. activeWeapon.name = weapManager.SelectedWeapon.weaponName;
    Any ideas?
     
  19. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You can find links for Documentations + Tutorials at the front post
     
  20. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    If you say activeWeapon game object is assigned, then weapManager component is missed, make sure Weapon Manager game object is tagged as WeaponManager
     
  21. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    The ActiveWeapon is assigned to everything as in your example prefab, "Networked Player", so I can't be missing anything. Also the Weapon Manager is tagged correctly.

    Cheers,
     
  22. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    And Character Animation is assigned into Remote Scripts To Deactivate? Check step 8
     
  23. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    Yup.
     
  24. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    After closer inspection, it seems like the "Active Weapon" doesn't change when I select a new weapon. I think this is causing the problems.

    It picks up the BallisticKnife okay, as I start with that. But doesn't change when I change weapon.
     
  25. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Make sure you assigned AnimationSync script into photonView observe value
     
  26. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    Ah, that's it - but had to drag the script onto it, instead of dragging the prefab. That's where I went wrong.

    Thanks!
     
  27. AsgerR

    AsgerR

    Joined:
    Apr 27, 2012
    Posts:
    18
    Do you think you could make a tutorial on how you've rigged the weapons to the hands? :) That way we would be able to add more weapons to the game or if there's a way to swap the current weapons on the model without damaging the animation, then i'd like to know. Furthermore the weaponpack 1 blender source zip doesn't work. I've tried 2 different unarchivers but no luck. :(
     
  28. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    Are melee weapons supported in this kit?
     
  29. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey, Im alredy made some tutorials, you can check them on front post, also did you checked tutorial on how to setup your own weapon using FPS Kit 2.0 (just go to front post and find tutorial links there)

    Cheers!
     
  30. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Yea, Weapon system support melee weapons
    Cheers!
     
  31. AsgerR

    AsgerR

    Joined:
    Apr 27, 2012
    Posts:
    18
    Don't think you quite understood, what i'm asking is if there's a way to swap the weapons in Blender using the source files. (Maybe a tutorial on how you've rigged the weapons in Blender). The main thing is that if i for instance download a weapon and want to add it, i could follow your tutorial on how to add weapons, but that weapon wont have hands.
     
  32. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Well Unity asset store dont allow .blend files, so I have to convert all models to .fbx. You can use third party converter to convert those models in Blender friendly format and edit it how you want
     
  33. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    Hello!

    There's an issue with players getting behind level walls (jumping/crouching/crawling through the rock mesh).
    What would you recommend?

    thanks,
    Slav
     
  34. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    I'm getting this error all the time when playing with other people.

    InvalidCastException: Cannot cast from source type to destination type.
    PlayerLocationSync.OnPhotonSerializeView (.PhotonStream stream, .PhotonMessageInfo info) (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/Network C#/PlayerLocationSync.cs:73)
     
  35. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    One more issue:
    Not a big deal, but is spamming the console, sometimes aggressively.
     
  36. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey, just place invisible box collider on problem areas and change it layer to IgnoreRaycast (So bullets can pass thru it)

    And what about errors you got, if those are not influence the stability of multiplayer, it can be ignored. Because sometimes micro connection instability could happend (it not cause any lag or connection loss) but result in those small errors
     
  37. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    There're lots of places all over the bunker map where passing throught the wall can happen. Tried to solve with box colliders - I think it is hard to impossible).
     
  38. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    What you mean passing throught the wall? As I remember there is only 1 place where players can climb the wall it is on top of bunker
     
  39. AsgerR

    AsgerR

    Joined:
    Apr 27, 2012
    Posts:
    18
    Since you can't upload the blender files for weapon package 1 on unity asset store do you then think you somehow could upload the blender files for weapon package 1 on a site like mediafire and send the link to me in a private message? I'd really like to get my hands on it so i can add more weapons. :)
     
    Last edited: Nov 9, 2012
  40. Mihai93

    Mihai93

    Joined:
    Jul 14, 2012
    Posts:
    213
    Is possible into next Update have

    - MultyMap chose Support
    - ScoreList
    - HitPoint
    - And Time (exemple 10.00 min for finish metch?)
     
  41. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    They fall through the geometry and start running behind map's walls.
    I can pm you a screenshot if it's not clear what I mean.
     
  42. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Thats why I suggested you place box collider on spot where is possible go out of map. so player have no chance to go out of map
     
  43. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    I'll need about 20-30(+) colliders to fix that. "Holes" are being found by players all the time.

    I just hoped there's some physics hint to solve that.
     
  44. salad__fingers

    salad__fingers

    Joined:
    Aug 11, 2012
    Posts:
    42
    where do we change the FPS Kit 2.0 text on the multiplayer connect menu? I can't seem to find it anywhere..
     
  45. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Open ConnectMenu.cs and search this line (its around in the middle)
    Code (csharp):
    1. GUI.Window (0, new Rect (Screen.width/2 - 250, Screen.height/2 - 150, 500, 300), connectMenu, "FPS Kit 2.0 | Multiplayer Test v2.4");
     
  46. salad__fingers

    salad__fingers

    Joined:
    Aug 11, 2012
    Posts:
    42
    Thank you.

    By the way, I edited some sounds for the guns, and other players cannot hear the new sound. Is there a way to fix this?

    Never mind, for anyone else with the same problem, go into the third person weapons, and in the third person gun that you are editing, there are the sounds.
     
    Last edited: Nov 12, 2012
  47. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    Will fpskit work in unity 4.0?
     
  48. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey, great question. I will download Unity 4 as soon as possible and will test FPS Kit 2.0 there
     
  49. AsgerR

    AsgerR

    Joined:
    Apr 27, 2012
    Posts:
    18
    Well after upgrading to Unity 4 it didn't work. Had to for some reason rewrite the menu script in order to get it working (don't ask why). I even tested the kit unchanged and the same thing there, but maybe NSdesignGames can give you a better hint at what needs to be done than i can. :) Also they .active and the .SetActiveRecursively doesn't work anymore so it can to be replaced by .SetActive() so you also have to go into each script and find the places where it says so and change it. Hope you guys can make it work too. :)

    And even if it works in the inspector do test it as build since that didn't work for me in the beginning.
     
  50. willemsenzo

    willemsenzo

    Joined:
    Nov 15, 2012
    Posts:
    585
    The project is nice although I'm having some issues with the server disconnecting randomly, this is happening on a regular base. I tested this alone, and with a friend. I tried to figure out if my internetconnection was the problem, but I'm on skype all the time and I haven't had any connection problems with it. I haven't changed any of the scripts other than the script that takes care of weapon switching and this works great and shouldn't be the cause of the problem because the problem occured before I even touched any script. Are you familiar with this issue?

    Also, I have another question regarding to updates. Are you planning to integrate team deathmatch and a gamemode like capture the flag and a score system? This would be a major feature which makes the multiplayer a whole lot more interesting.

    Thanks in advance :)