Search Unity

FPS Kit | Version 2.0

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

  1. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    what do you mean? hehehe, i can't get what you are pointing out hehehe.. sorry noob. ^^
     
  2. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    I just gave a suggestion.
    It's hard to suggest something because I dont know what changes you made in code.
    Btw last part of you sentence looks like you called me a noob xD
     
  3. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @NSdesignGames im pointing at me not on you sir hahahah... ^^ ...


    im using this kind of code


    and this kind of things on the scoreboard to show ... " Kills : " player.customProperties["Kills"] + " Deaths : " + player.customProperties["Death"]

    ....
     
  4. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    I see you setup Hastable for "Kills" but I dont see any for "Death".
    When you kill someone, you need to send RPC call to that player so he can do same steps, in this case player register how much it died.

    You can check Photon forum for more info.
    Also I found this topic, it might be useful http://forum.exitgames.com/viewtopic.php?f=17&t=2441&hilit=scoreboard
     
  5. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    Worked great, thanks dude :)
    Now I gotta figure out hiding this health lol
     
    Last edited: Feb 26, 2013
  6. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    i used this death also like this

    Hashtable PlayerCustomProps = new Hashtable();
    PlayerCustomProps["Death"] = YourPlayerScore;
    PhotonNetwork.player.SetCustomProperties(PlayerCus tomProps);

    and this when killed somebody ... YourPlayerScore = YourPlayerScore +1

    and put in in PlayerDamage.cs on function when a player dies

    also sir about the winning player how to include it? using hashtable also? example when a player reach the required number of kills the game will stop and show the top player who kills alot?can you give me an idea? TIA
     
    Last edited: Feb 19, 2013
  7. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    Will this work for players when they spawn? like randomly placing items/weapons in their inventory?
     
  8. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You do everything right, only thing I would suggest is do not put Hashtables inside update as it does heavy impact on connection.
    Try to assign Kills/Death only when needed, like if(PreviousKillCount != CurrentKills){ Set Your Hastable}

    What about winning player, your Idea is right, when match ends you loop throught player list and check which player have the more kills, than choose a winner.
     
  9. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    ohh thanks. . . for your answer.. ^^ i'll try it out...
     
  10. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @NSdesignGames im done on it now heheh thanks for your info... but still the Death Score is not working perfectly.... about on winning player if somebody reach the required winning kills how to show the winner in screen and go back to the lobby when the player won..... how can i add it? can you give me a sample please? ? ? TIA
     
    Last edited: Feb 19, 2013
  11. superme2012

    superme2012

    Joined:
    Nov 5, 2012
    Posts:
    207
    Hi, I decide not to use your kit. It’s not because of your kit it’s down to the photon cloud network API. It’s a little to hard for me to get to grips with. In my case I need to make the network code work in a very specific way and that’s not possible with the photon cloud due to its learning curve.

    It’s strange as the tutorial went really smoothly but when I tried to make my own stuff there was all kinds of unknowns. Anyway, I decided to stick with unity base network library and move onto uLink if I ever decide to put anything into production.

    I just wanted to let you know as you have been very helpful and I really respect the work you have put into the FPS Kit.
     
  12. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    Will you support new Cloud version?
     
  13. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Well previous version still works, and as I know the only changes were made in the way RPCs executed and also added scene sync feature
     
  14. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @NSdesignGames im done on it now heheh thanks for your info... but still the Death Score is not working perfectly.... about on winning player if somebody reach the required winning kills how to show the winner in screen and go back to the lobby when the player won..... how can i add it? can you give me a sample please? ? ? TIA
     
  15. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Its really hard give a simple and fast example for your problem. To do so it will probably require sit down for couple of hours writing the script. As I suggested, go to Photon forum

    http://forum.exitgames.com/

    and ask your question there or search for topics that alredy have answers that might help you.
     
  16. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    ok thanks
     
  17. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Hi, I have followed your "third person character" tutorial perfectly and animations are simply just not syncing, help! Thanks. :)
     
  18. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    -Make sure you have assigned correctly all game object used for comunication.
    -Also make sure all animations are assigned into animation list.
    -Try to read again that tutorials, double check everything.
    -Look at editor console, if there is any error, inspect it and make corresponding changes.
     
  19. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Thank you for your reply, I have double checked everything and everything is in order. The model I am using was rigged in 3ds max and was exported as fbx.
    Although, I do get a error message that says:
    "Number of bind poses doesn't match number of bones in skinned mesh.
    UnityEditor.DockArea:OnGUI()"

    Does this mean anything? thank you. :)
     
  20. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    It says that something wrong with your character rig. It could be caused by various things. Or import setting have wrong configuration, or the model have problems itself.
     
  21. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Hmm.. is there any particular settings I need on 3ds max in order for it to work? :) Because other than that I don't see any other reason why it would be causing it not to sync. >.<

    *edit*
    The error only seems to pop up when the "CharacterAnimation" script is attached.
     
    Last edited: Feb 20, 2013
  22. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Does your character have all animations assigned, have you tested them at runtime to be sure they are working.

    Also you should check console for errors at the momment the problem occur.
     
  23. portgalaxy

    portgalaxy

    Joined:
    Dec 9, 2011
    Posts:
    55
    Does this support databases? Like would it be possible to make users create accounts so I could unlock certain things for some users?
     
  24. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Yeah, all the animations are assigned as normal (and work in unity runtime), You see they all count as one big animation when I export the model as fbx, then I split them inside the animation inspector. They are just simply not working at all. :(

    *Edit*
    I just attempted to re-add the original Soldier(fbx) model as the player model and it gave me the same error, help! Thanks. :)
     
    Last edited: Feb 21, 2013
  25. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    FPS Kit 2.0 does not include account system.
    To see complete feature list, check front post

    http://forum.unity3d.com/threads/153337-FPS-Kit-Version-2.0
     
  26. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    I see now, you have your character animations merged in one. You will have to manually split them by keyframes.
    For Example Animation "Idle" starts from frame 1 and ends at frame 10. I suppose modeler you get model from, included .txt file with all keyframes and animation names.

    Thats all I can help in this situation, its up to you to split those animations to make it work.

    Cheers!
     
  27. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    No. The scripts I provided is makes your weapons spawn points drop random weapons or items. For example if you don't want the rpg always spawning in the same place so players in your game don't always run to the same spot for the rpg. This should make the game play a little more interesting instead of having players camp next to their favorite weapon spawns. I'll see if I can whip up a spawn player with random weapon script but not sure when.
     
  28. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    That's still something very useful, will save that script and looking forward to the spawn player with random item script if you ever do one.
     
  29. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Thank you again for your reply, but you see I've already done that. :) But Alas it still does not work sadly. :( I looked it up myself on google but found no hope.
     
  30. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    But you said after you splitted animations they didnt worked at runtime, which menas something was done incorrectly etc.
    There could be one of many possible problems, I just cant guess all of them.
     
  31. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Hmm, would it matter if I skipped a few animation key frames when splitting the animations? thank you again. :)

    *Edit*
    I rebuilt the project and everything seems to be working fine now, strange.. >.<
     
    Last edited: Feb 22, 2013
  32. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    And now for some reason none of the third person weapons work on my new player model...I've again, followed the tutorial exactly? Do you know any reasons behind this? (On another note, I've added in new character animations in the "Character animation" script" for different weapon types such as "Rockets, Miniguns" .etc). :)
     
  33. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    So you made changes to Player Animation script? The only thing I can suggest in this case is to check Unity scripting reference and track console for errors.
    I have no control on what changes you made so cant help much in this case.
    Cheers!
     
  34. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    @NSdesignGames - is there going to be an update anytime soon? if so can you give us a glimpse of the feature list?
     
  35. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    What features you want? It also looks like most users just waiting for Updates instead of making a game.
    FPS Kit 2.0 alredy contains all basic features to make Multiplayer Fps.
    If you want to make your unique game, you will have to customize exisiting Kit by yourself (or hire someone).

    Cheers!
     
  36. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    I receive no errors that relate to it however sadly. And not major changes, just addons really such as:
    :)
     
  37. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    *facepalm* Sorry but this is only 2 variables, they will do nothing. Please do better research about programming before customizing a code.
     
  38. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    No no sorry I was just showing an example, I know what they are and what they're used for. I have the rest of the coding of course:
    And under "ThirdPersonWeaponControl"...
    Is there anything I'm missing out or..? Also, now this error is suddenly appearing.. >.< I'm not sure this has anything to do with it though:
    NullReferenceException: Object reference not set to an instance of an object
    CharacterAnimation.Update () (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/FPScontroller/CharacterAnimation.js:95)
     
    Last edited: Feb 22, 2013
  39. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    Well no, I'm not asking for specific features or a completely built game, lol, I was just wondering if you're going to make sure that the kit will always be updated, bug fixes, new features, etc.
     
    Last edited: Feb 22, 2013
  40. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    All Tutorials/Documentation are explaining general usage of FPS Kit 2.0 and it components, they are only applies to this Kit

    But if you want to look further into programming part of Photon multiplayer or FPS System, all scripts have comments inside which are explaining each part of code.

    Right now I dont have much free time so I am only here to answer questions related to Kit.
    But I will make sure that FPS Kit 2.0 always be compatible with latest version of Unity.
    I might consider adding new features once I got time.

    Cheers!

    EDIT: Replied to unedited post
     
    Last edited: Feb 22, 2013
  41. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    I have another question. I purchased an AI system where the AI looks for a tag "Player". If I tag a standard first person controller as "Player" the AI finds it just fine. If I tag the NetworkPlayer the AI doesn't see it. Is the system possibly re-tagging the player or something?
    The AI system I'm using is AI 4 Enemies from the asset store.
     
  42. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    I suppose AI you using is for single player only. So you will have to modify it in order to work in multiplayer.
     
  43. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    The AI will pick up multiple targets if that's what you mean. If it is looking for an object tagged player why would it matter if it is single player or multiplayer if the player is tagged as player?
     
  44. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Multiplayer works differently from single player. Each player have 2 instances, one is local which you control and other is remote which all other players see. In case of AI noone controls it, but it still need to be synchronized over Network but its done a different way, so everyone see the same thing on their screen (Synchronization is a key of multiplayer).

    Just to let you know Signle players rules are not applyed in Multiplayer, so by only assigning multiple targets on AI will not work.

    Personally I never implemented AI to multiplayer so I can only guess how to do it.
     
  45. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    That makes sense. In our fps kit how do I know which one is local and remote? Or is it just a dual instance of the same thing ? Do you think it may be as easy as just tagging both if possible? This is killing me lol I been trying to hack my way around it for a week lol
     
  46. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    I think I may have an idea. When I attach the object named target to the networkplayer prefab I get a little error that says failed to instantiate object. Is it possible that I may just have to sync that one object I attached? If so how would I do that. Sorry for asking so many questions lol
     
  47. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @NSdesignGames i've successfully managed to work the scoreboard with number of kills and deaths of the player. Now I'm having problem on setting the winner . . . . how can i setup the max kills to win? my idea is not working ...


    edit...
    i've already figure it out ^^
     
    Last edited: Feb 23, 2013
  48. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @NSdesignGames how can i show the playerlist w/o pressing the tab key? example if the player wins the game the playerlist will pop up? because i'm trying it and it doesn't show correctly..
     
  49. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    NSdesignsGames, can you please help me?

    I bought your kit, i was modifying it, and playing with it, now anything initialized by Photon is not getting removed from the scene, like the bullets(clone) everything, like dead bodies, stay in the scene and don't fade out of it. How can i fix this? I even uninstalled Unity, re-downloaded from the asset store the original project and its still not working right. Can you help me solve this?
     
  50. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    In RoomMultiplayerMenu.cs in void Update(), you need to find part with if(Input.GetKeyDown(KeyCode.Tab)). Under that part you will find isPaused = !isPaused;.Which means when isPaused == true, scoreboard will be shown.
    So for example when round time ends, you should set isPause = true;