Search Unity

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

    So if I understand right. When you first imported Kit to project it worked well. Than you did some changes which messed up some code?

    In this case you dont need to reinstall Unity. Just create new empty project and import FPS Kit 2.0 from Asset Store to that newly created project.
     
  2. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    ok thanks . .. sir for this im gonna try it again..

    edit:

    ive tried it but the scoreboard doesn't show up...
     
    Last edited: Feb 26, 2013
  3. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    I just Imported to empty project, i keep having errors.

    Now i get

    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)

    I also get error (Remote tag not defined)
    and my soldier(ragdoll) camera is missing but at the local files is there?

    And the "Who Kille Who Msgs" at the screen they not fading out


    I dont get this error, till i open a client and connect to the same room

    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)

    Line 73: capsulePos = (Vector3)stream.ReceiveNext();
     
    Last edited: Feb 26, 2013
  4. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    go to EDIT > PROJECT SETTINGS > TAGS > add the tag Remote ... it should be work now
     
  5. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    Thanks for the help, but remote tag is already there, and i still get the error?
    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)
     
    Last edited: Feb 26, 2013
  6. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    thank you NSdesignGames , for your help on trying to figure out, i just searched around, saw people getting this error, when using bunker map.
     
    Last edited: Feb 26, 2013
  7. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    I'm still tinkering with adding the AI. Can you tell me how I can add a child object to the NetworkPlayer and have it show up in game. I think once I know how to do that I can start understanding how to sync in my AI target object. Thanks dude.
     
  8. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    Got my AI Working I'm having a blast with it so far pun intended.
    Is it ok to tag the bullets or will that screw something up?
    I'm putting a collider on the head of my AI to do more damage for headshots and it filters collisions by tag.
     
  9. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Bullets have no collider attached. It uses Raycast to pass damage.
    Just add next function to your script to receive damage

    Note if you using .js its function if C# its void

    void ApplyDamage(float damage){
    totalHp -= damage;
    }
     
  10. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @NSdesignGames . . . . when i reach the kills needed. . . after i create again it still on freeze.. also after the game when i create again .. i can't see other player when they join me i need to reconnect so that we can see each other.. or how can i restart my connection after returning to lobby?
     
    Last edited: Feb 28, 2013
  11. germcdonald

    germcdonald

    Joined:
    Feb 22, 2013
    Posts:
    3
    Hey guys, nice looking kit :). Is there Android/iOS integration at the moment in the package?
     
  12. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Bugs are the part of game development. And when you start to create your own things or customize exisitng, bugs might appear aswel. To implement round system, you will have to modify various scripts to make it work, its up to you to figure how.

    PhotonNetwork.LeaveRoom() and PhotonNetwork.JoinRoom() is what you might use. Check photon documentation inside FPS Kit 2.0 package for more info.
     
    Last edited: Feb 28, 2013
  13. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey, FPS Kit 2.0 wasn't tested on mobile platform, so no info if it works there or not
     
  14. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45

    i see.. thanks im gonna try to modify it hehehe... thanks..

    about the fall damage? should i insert it on playerdamage.cs?
     
    Last edited: Feb 28, 2013
  15. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Hey its me again. :D
    I compile the game to work on UnityWebplayer, when I Click "Spawn" or "Leave room" nothing happens. Help! Thanks.
    ~ZeoWorks
     
  16. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You are using old version of FPS Kit 2.0 which is not compatible with Unity 4.
    If you bought it on Asset Store, you can download latest verison for free.
     
  17. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    How can i change my model ? I tried Adding photonview to my 3dModel, added all the same scripts as properties show in the default Networkplayer Properties panel, i dragged ragdoll to the panel, I also made empty object , named to NetworkPlayer2 and placed it at Assets root folder.[Resources]
    I couldnt parent the Soldier Ojb and to SOldier ragdoll to the NetworkPlayer2 copy of NetworkPlayer in the [Resources] folder.

    I dont know what im doing wrong? Can you help?

    I Also would like to know how can i do, if i want my NetworkPlayer(Team A)
    to spawn only at Team A spawnpoints and not ramdom like it shows at the script.
    Im trying to make a team deathmatch and i just thought i also duplicated
    SpawnPlayer and made a SpawnPlayer2 ect..ectt

    i Addded the team A n B to each separate positions,
     
    Last edited: Feb 28, 2013
  18. BL00DCELL

    BL00DCELL

    Joined:
    Jan 27, 2013
    Posts:
    22
    Hey NS I made a weapon respawn script for the pickup items but when I test in multiplayer the players don't see the same weapon that was spawned. Kind of mind blowing lol. I added photon view scripts to them hoping it would help but no luck. Any suggestion on how I can sync items spawned in a running game? Thanks dude.
     
  19. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Check this tutorial for replacing 3rd person character model - http://www.mediafire.com/view/?0wysaw6wrfdq4ib
    And also check front post for more tutorials - http://forum.unity3d.com/threads/153337-FPS-Kit-Version-2-0

    To separate spawn points you will have to separate players by teams and define spawn points for each team.
     
  20. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Instead of spawning weapons with Instantiate you need to use PhotonNetwork.Instantiate to spawn objects over network. Note that prefabs you spawn with this method should be placed in folder named Resources
     
  21. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    I'm using 1.2c because I started my project in 3.5 and left it for a while then came back to it. ^_^ I don't want to upgrade otherwise I'll have to restart all my work. D: Is there another way around it? thank you.
    ~ZeoWorks
     
  22. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Yea, you can PM me copy of invoice number .PDF which was received after purchasing FPS Kit 2.0 on Asset Store. After that done I will provide assistance.
     
  23. ZeoWorks

    ZeoWorks

    Joined:
    Dec 13, 2012
    Posts:
    76
    Sure, where do you find it? :)
     
  24. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    Im getting some errors, i did whats in the tutorial for 3rd person character , below is the screen shot of the errors.
    SendMessage syncMachineGun has no receiver!
    UnityEngine.GameObject:SendMessage(String, Object)
    WeaponSync(Catcher)JS:Fire() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/Network C#/WeaponSync(Catcher)JS.js:19)
    UnityEngine.Component:BroadcastMessage(String, SendMessageOptions)
    $:MoveNext() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/WeaponSystem/WeaponScript.js:361)
    UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
    WeaponScript:machineGunFire() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/WeaponSystem/WeaponScript.js:326)
    WeaponScript:machineGunFixedUpdate() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/WeaponSystem/WeaponScript.js:300)
    WeaponScript:Update() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/WeaponSystem/WeaponScript.js:207)

    NullReferenceException
    CharacterAnimation.configureAnimations () (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/FPScontroller/CharacterAnimation.js:218)
    CharacterAnimation.Start () (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/FPScontroller/CharacterAnimation.js:67)

    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:84)
     

    Attached Files:

    • $SS.jpg
      $SS.jpg
      File size:
      158.4 KB
      Views:
      1,227
    Last edited: Mar 1, 2013
  25. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @ NSdesignGames can i ask on joining when in another scene? because when i created a game in another scene then a player is in another scene how can i make him to join in my map? because i am having trouble on it when he join he is still on the same map. . . using the PhotonNetwork.automaticallySyncScene how to use it?

    ill try to download the 3.5.7 unity version... is says that i has the correction of the scenes...
     
    Last edited: Mar 1, 2013
  26. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Unity Tech sends a confirmation of the sale with this PDF.
     
  27. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    When creating room, you can set custom properties to that room saying the name of current map. And when somebody connects to that map, it read room properties where it says name of map and loads respective scene.

    Check Photon forum, I saw there some topics that might help you.
     
  28. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Check if you assigned third person weapons to it respective first person weapons in WeaponSync(Catcher).js
     
  29. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    My Character is weapons are not visible at online
    Why? I can see my character but i cant see the weapons, only him holding nothing




    third Character Replace tutorial

    15. Now it’s time to setup player hitboxes - box colliders that attached/scaled to main
    character bones, such as Neck, Head, Torso, Upper Hand, Lower hand, Upper Leg,
    Lower Leg

    Can you explain to me the number and filename of the bones in "networkplayer"
    each one like character bones, such as Neck, Head, Torso, Upper Hand, Lower hand, Upper Leg,
    Lower Leg

    Upper Left hand is filesname - Bone_002_L
    I need to know em all so i can scale them better to the character please
     
    Last edited: Mar 2, 2013
  30. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    how can i lessen the damage of the bullets? and adding round timer? how to use PhotonNetwork.timer?
     
    Last edited: Mar 2, 2013
  31. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    3d person weapons are not visible because something is not assigned. Check console for errors while you see bugged player in front of you.

    You just need to select each bone of character and see their origins. And just check what part of body it represent, than assign box collider and scale it the way it cover the body part that the bone represent.
     
  32. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Select prefab called Bullet, it have component called Bullet.js. There you can tweak damage

    What about round time, you will probably store initial PhotonNetwork.time value and than do next

    round time = PhotonNetwork.time - initialRoundTime;
     
  33. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    you mean i include this line PhotonNetwork.time - initialRoundTime;
    in roommultiplayer.cs on Start()...? also i tried to update the PUN to 1.18 then a error appears this error
     
  34. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
  35. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    @TB0Y298 . . . how did you do you team deathmatch mode?
     
  36. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    Im not going to explain this. Sorry mate.
    Maybe until my first game has been released.
     
  37. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
  38. programmrzinc

    programmrzinc

    Joined:
    May 29, 2011
    Posts:
    79
    For those who are having problems with the Kit in Unity 4, Create a "Remote" tag, and remove the MultiplayerChat Component from the _Network gameobject. That is all



    NitroLabGames
     
  39. Annihlator

    Annihlator

    Joined:
    Oct 15, 2012
    Posts:
    378
    You're sickening.

    You beg for help on each and every single aspect and seem to know only how to drag-and-drop things. Or very clearly are trying to circumvent (i.e. NGUI:) trial version limitations.
    Then when someone asks you to explain something, you pretend to be standing on some high throne of all sorts without even spewing generic info.

    And to top it all off, a twofold google queries shows your excistance is funded mainly by Warez.

    I hope you can take this as a real piece of criticism and DO SOMETHING WITH IT.

    Or... you know what...
    I hope that you DO get to release that game and then get caught with the piracy.


    But atleast just realize at this point you're only following tutorials and have to ask everything thus far, might be wise to lend people a hand sometimes. even if you're not good at much yourself (i'm trying to still find something... nothing on ArmedUnity either)

    Just as an example:
    http://forum.unity3d.com/threads/169994-Incoming-Notification-Message
    You can achieve that by using GUI components, built-in in Unity.
    It's not the easiest, but a core-component. And looking through your topics, the one posted two weeks before is even using those exact components.

    I'm sorry, but it's impeccably hard to believe that you are, because of all those things, actually doing something yourself and not only doing your best at hiding what other did for you.

    And in dutch you are saying in english the people won't assist you.
    But maybe it's because of all that. So how about trying to clear up your name, yeah?
    show some of your initiative
     
    Last edited: Mar 4, 2013
  40. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    How can create a scene view, that will allow me to choose game mode and timer game's mode like death match ?
     
  41. EliteUnity3D

    EliteUnity3D

    Joined:
    Feb 8, 2013
    Posts:
    15
    How do i call a NGUI Panel in the Scene/ is already in the Scene, I went to "Button "Respawn"
    and want to call it from there as soon they click on spawn it will call the NGUI panel then will go back to normal
     
  42. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    i have this error when im trying to create again after a previous game.....

    MissingReferenceException: The object of type 'PhotonView' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.


    UPDATE : i've already figured it out
     
    Last edited: Mar 10, 2013
  43. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    adding countdown timer globally how to do it? any tips or example?

    also when im trying to add this line to the connectmenu.cs

    the aumaticallysyncscene

    whenever i create a room it freeze and turn to a blank background...
     
    Last edited: Mar 10, 2013
  44. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    what is this error ?
     
    Last edited: Mar 10, 2013
  45. Hesa-Games

    Hesa-Games

    Joined:
    Mar 11, 2013
    Posts:
    1
    This Kit should have a minimap who show dot when someone shoot like any fps with that name :p
     
  46. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Try to call PhotonNetwork.automaticallySyncScene= true; when you connecting to lobby

    And from your script leave only this part

    Code (csharp):
    1. void OnJoinedRoom()
    2. {
    3. if(PhotonNetwork.isMasterClient){
    4. PhotonNetwork.LoadLevel(level);
    5. }
    6. }
     
  47. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You try to Destroy game object which was instantiated using PhotonNetwork.Instantiate()
    To destroy these objects use PhotonNetwork.Destroy()
     
    Last edited: Mar 12, 2013
  48. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45

    ive already figured it out .. i just need to add this line :
    PhotonNetwork.automaticallySyncScene= true;

    when creating a room.
     
  49. Centilmen50sss

    Centilmen50sss

    Joined:
    Mar 13, 2013
    Posts:
    1
    Hello, FPS Kit 2.0 I bought it, but the game does not turn on I can not spawn button unit does not
     
  50. WolfGames

    WolfGames

    Joined:
    Jul 25, 2011
    Posts:
    65
    yes.. same problem.. fix it please.