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

    keilyn3d

    Joined:
    Jan 11, 2013
    Posts:
    5
    Anyone know if is possible to change levels in multiplayer?, can be any method, if anyone have an idea I am able to pay for it, so if anyone know how to change levels, send me a PM.
     
    Last edited: Jan 11, 2013
  2. wackyracer3

    wackyracer3

    Joined:
    Jan 5, 2013
    Posts:
    14
    Okay, so before I go onto my problem, let me just say that I have indeed correctly separated the animations for my gun.

    Why is it that during in-game it will NEVER play the idle animation? It just stands still. I am totally stumped on why this is happening, can you please help me out with this problem NSdesignGames? :mrgreen:

    Oh, and I am not sure if this is a bug or something you never noticed, but bullet collisions have a small bug. With normal walls they collide properly, but if that wall has a ladder on it, if you shoot at the ladder, it doesn't collide at all. Nothing happens. Is there a way I can fix this, or would I have to wait upon a new update?

    Also, when I click to aim down sights on my gun model, it automatically positions the gun in what it thinks is the perfect coordinates so that it may shoot dead on with the iron sights. With my gun, it positions it a little off. I have my gun aiming down my iron sights perfectly with the correct values on the aim properties, but when I shoot, the actual bullet that shoots is not where I am aiming with my iron sights, it's a little off to the side and beneath the gun. I have no idea how to fix this, I've already tried re-positioning the gun in the Scene view, but it doesn't even budge it at all, since it seems that the code in the FPS Kit automatically positions the gun in what it thinks is "the center" of the screen. If I modify the aim properties values to aim where the bullet would hit, it won't be aiming down ironsights, it will be slanted and looking a little to the right. What do I do?

    And lastly, I was wondering, is it possible to implement Ultimate FPS Camera to work along with this?
     
    Last edited: Jan 11, 2013
  3. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    Hi, i need some help.
    How do i make a object destroy itself if it is hit by a bullet???
    Does anyone know how to do this
     
  4. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    I have a problem
    UnassignedReferenceException: The variable ThirdPersonWeapons of 'WeaponSync(Catcher)JS' has not been assigned.
    I don't understand? i can't see the other player shooting, but he can kill me, animation works fine...
    I wrote in the script ThirdPersonWeapons, it was thirdPersonWeapons before and i had another error with messages of this script(SendMessage has no recieveer), so this problem
    i had before i change the prefab name...
     
  5. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    WeaponAnimation script by default not supposed to play Idle animation after each shot (You will have to modify it to do so). In example weapons after each shot, gun goes to initial position because animations were made like that so the last frame of shooting animation correspond gun idle position.

    What about collision with ladder, thats not a bug, just change Ladder prefab layer from IgnoreRaycast to Default.

    Aiming down sights is something that should be tweaked by developer in editor. It does not know automatically which is aim position for your gun since different gun models have different scale/pivot point etc. Check this tutorial http://www.mediafire.com/view/?ko70h4f8wc8db2d# , at the pages 5 - Step 17 you will find the answer but also I suggest you to check all tutorials, the links are located at front post.

    I believe it's possible to implement any package with any package, it's just depends on programing knowledge.
     
  6. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Make sure that variable of each 'WeaponSync(Catcher)JS' is assigned like it is in ExampleCharacter prefab.
     
  7. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    Variable like third person weapon? in inspector then i choose this script?
    no, i can't add anything, it's empty...
     
  8. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Thats what caused those errors, third person weapon variable should be assigned.
    As you see WeaponSync(Catcher)JS script is assigned to each first person weapon near WeaponScript component, and third person weapon variable correspond respective third person weapon. SO when you select some weapon in first person, it activates it third person clone and others can see it.
     
  9. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    As assigned , but when i click it for choosing in inspector, i can't add anything....there is nothing...

    how can i fix it?
     
  10. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You need manually drag and drop each third person weapon into respective variable.
     
  11. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    And where can i find this weapons?
     
  12. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
  13. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    So, i just need to assign it to Example Character prefab?
     
  14. TVE

    TVE

    Joined:
    Oct 15, 2012
    Posts:
    379
    Awesome multiplayer test webplayer. Great job!
     
  15. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    because i don't have any third person weapons assigned in example character...
     
  16. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    i have assigned it only at soldier at the network hierarchy
     
  17. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    are you going to have an updates to this kit? like adding a private match? drawscoreboards? etc etc?
     
  18. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You need to assign third person weapons from your caracter that you working on.

    But how can you ask questions like this, did you even read that tutorial I sent you? I believe you are not yet ready for this kit and I suggest you moving to basics and learn how things are done. Like what is prefab, how to assign variables etc.

    Dont get me wrong but thats just my thoughts.
     
    Last edited: Jan 17, 2013
  19. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    I dont think so, FPS Kit 2.0 is alredy contains all basic features for creating multiplayer game, its wasnt meant to be complete game but an example that help developers customize it and create their unique game.
     
  20. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    I don't have any character, there is only your character...
    yes, i have read it, but anyway, i don't understad, i need to place some character ( i don't know where can i get him) to the scene?
    i know what is prefab, but i don't know how did you do this kit...and i still don't understad, i have already assign third person weapons on the soldier...what can i do?
     
  21. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Drag prefab to scene, inside scene view locate third person weapon that correspond your first person weapon with hands, assign it into WeaponSync(Catcher)JS ThirdPersonWeapon variable, than just darg and drop that character back to prefab to save it.
     
  22. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    Ok, thank you, now i understood... sorry...
    and i have 1 more question, about main ladder to the bunker, in your demo i can go upstaird, downstairs, but in my i can do it only with jumping...
    i think, i need to place there some prefabs to can go normally...


    So, now i still have the same problem that i had before...
    SendMessage syncGrenadeLauncher 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:28)
    UnityEngine.Component:BroadcastMessage(String, SendMessageOptions)
    $:MoveNext() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/WeaponSystem/WeaponScript.js:508)
    UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
    WeaponScript:grenadeLauncherFIre() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/WeaponSystem/WeaponScript.js:465)
    WeaponScript:LateUpdate() (at Assets/FPS Kit Version 2.0/_CustomAssets/Scripts/WeaponSystem
     
    Last edited: Jan 18, 2013
  23. Pixmah

    Pixmah

    Joined:
    Jan 3, 2013
    Posts:
    45
    ohh i see... do you have a idea on how can i add the team deathmatch?? i want to try that out.. but i cant start it...
     
  24. Acolit

    Acolit

    Joined:
    Aug 13, 2012
    Posts:
    51
    I don't understand why i cannot recieve this data...
     
  25. TB0Y298

    TB0Y298

    Joined:
    Dec 25, 2012
    Posts:
    59
    How do i add more maps? This happend for example:
    When i open 1 window with "map01(Multiplayer)" and open another window with "map02(Multiplayer)".
    If a player creates a server at map01, the player at map02 can see it in the server browser to.
    How do i fix this?
    Plz help us
     
  26. Pixltex

    Pixltex

    Joined:
    Dec 17, 2012
    Posts:
    1
    just a quick question, is this written in js or c#?
     
  27. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey, FPS system is written in .js and multiplayer parts is on .cs
     
  28. BlackHunter

    BlackHunter

    Joined:
    Oct 28, 2012
    Posts:
    88
    GUI don't working on WEBPLAYER!!!!!

    and how add new maps ?? turtorial please!!!
     
  29. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    GUI is not working because you using older version of FPS Kit 2.0 which is not supported by Uity 4.
    Just go to Asset Store and download latest version for free using same account you bought it on.
     
  30. SLIMEBASS

    SLIMEBASS

    Joined:
    Aug 26, 2012
    Posts:
    9
    Hey there. I bought your package for about a month ago but Im having some problems making a object damage.
    Example: When i shoot at an cube and the health is zero it destroy itself.

    I tried to take you PlayerDamage.js and convert it to singel player but i failed, Here is the code:
    Code (csharp):
    1. //NSdesignGames @ 2012
    2. //FPS Kit | Version 2.0 + Multiplayer
    3.  
    4. //This script is used to controll player health
    5.  
    6. using UnityEngine;
    7. using System.Collections;
    8. using System.Collections.Generic;
    9.  
    10. public class ZombieDamage : Photon.MonoBehaviour {
    11.    
    12.     public GUISkin guiSKin;
    13.     //Player health
    14.     public float hp = 100;
    15.     public float currentHp;
    16.    
    17.     void Awake(){
    18.         currentHp = hp;
    19.     }
    20.        
    21.         currentHp -= damage;
    22.        
    23.         //We got killed
    24.         if(currentHp < 0){
    25.             currentHp = 0;
    26.         }
    27.     }
    Please i really need help with this one :)
     
  31. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    As I see all you did is removed random parts from PlayerDamage.cs and expected it to work?

    My suggestion is try to "Google" everything you dont know, for example "Unity 3D player damage"

    I were able to find this:

    Code (csharp):
    1. using UnityEngine;
    2.  
    3. using System.Collections;
    4.  
    5. public class ZombieDamage :MonoBehaviour {
    6.  
    7. public float hitpoints = 100;
    8.  
    9. public void ApplyDamage (float damage) {
    10.      hitpoints -= damage;
    11.      if (hitpoints <= 0f) {
    12.           Destroy(gameObject);
    13.      }
    14. }
    15.  
    16. }
    17.  
    Make sure script is called as ZombieDamage and attached to your Cube or other target you want to destroy
     
  32. BlackHunter

    BlackHunter

    Joined:
    Oct 28, 2012
    Posts:
    88
    Last edited: Jan 26, 2013
  33. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    If you dont have Unity 4 how you were able to download FPS Kit 2.0? As I know, Asset Store do not allow to download packages which were made in higher version of Unity into older version.
     
  34. BlackHunter

    BlackHunter

    Joined:
    Oct 28, 2012
    Posts:
    88
    I am using the old version. For unity35. I connected with dialup (50 kb/sec). unity4 and fpski i cant download
     
    Last edited: Jan 26, 2013
  35. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    If you use Unity 3.5 and older version of FPS Kit 2.0 you shouldn't have any problem with GUI.
     
  36. BlackHunter

    BlackHunter

    Joined:
    Oct 28, 2012
    Posts:
    88
    game-creators (dot) 16mb (dot)com/ play (dot) html
     
  37. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Just checked it, GUI seems working fine. Good job btw, but a bit laggy though.
     
  38. BlackHunter

    BlackHunter

    Joined:
    Oct 28, 2012
    Posts:
    88
    thanks, this is my first project . GUI buttons for spawn dont working in webplayer!
     
  39. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    But everything is worked fine for me, all buttons responded to mouse click and I were able to spawn
     
  40. SLIMEBASS

    SLIMEBASS

    Joined:
    Aug 26, 2012
    Posts:
    9
    Its works but how?

    I did just like you said and i shot at the cube 15 times with the deagle, Nothing happened. Then i changed the hitpoint value to 1 and still same thing, But with the RPG it did work at one shot. So my question is where can i find the script where the "Damage" Value is applied?

    Cheers
     
  41. SLIMEBASS

    SLIMEBASS

    Joined:
    Aug 26, 2012
    Posts:
    9
    I have heard that many has the same problem with the GUI, Note that this is ONLY when they run Unity 4 and using the old package for 3.5. I dont see any reason to use the 3.5 package on Unity 4 if you already have bought the package? (If you have not bought it, Shame on you!)

    Otherwise you can just try updating the webplayer (Downloaded at www.unity3d.com)

    Cheers
     
  42. anton1987ru

    anton1987ru

    Joined:
    Nov 16, 2012
    Posts:
    15
    Hello please tell me how to add image effects on main camera ???
     
  43. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Download Image effects package, than select MainCamera and go to Component -> Image effects and select any.
    Note: Image effects dont work in Unity free
     
  44. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Try to tweak bullet damage, set it to 50 for example and than test it.
     
  45. anton1987ru

    anton1987ru

    Joined:
    Nov 16, 2012
    Posts:
    15

    thanks but you do not understand, I mean as in the scene bunker(multiplayer) to change the default value of the camera, for example i want change Far from 1000 то 5000, how i can change this value? . so that all player number automatically add effects to the camera. :D
     
    Last edited: Jan 28, 2013
  46. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You need to drag player prefab into scene view, assign all values you need, than save it back to prefab so all players are spawned with new values.
     
  47. anton1987ru

    anton1987ru

    Joined:
    Nov 16, 2012
    Posts:
    15
    Thanks this works perfect!! :)
     
  48. wackyracer3

    wackyracer3

    Joined:
    Jan 5, 2013
    Posts:
    14
    I also had this trouble, and after some searching around the files, I found it. Look for Bullet.js, that controls the bullet damage as far as I know. Scripts>Weapon System folder location to be exact.

    @NSdesignGames - I have a question about the bullet damage system you have in this kit. It seems like this bullet damage value of 20 is set for ALL guns in the game, including the sniper. So apparently all guns do 20 damage to a player. What I want to do is make it so that I can customize each gun to have different amounts of damage. For example, I want my UZI to do 30 damage, I want my AK47 to do 40, and my M16 to do 36. How would somebody be able to do that? I don't want all of my guns dealing 20 damage! Haha
     
    Last edited: Jan 29, 2013
  49. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Its easy, just clone bullet prefab and assign it to any weapon, than change damage value for that prefab you just assigned.
     
    Last edited: Jan 29, 2013
  50. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    *facepalm* seriously, how you even got an that idea to just parent bullet prefab to soldier?

    Select Deagle game object (or any other weapon) -> In the WeaponScript assign Bullet variable with new prefab.