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. Noah-Essa24

    Noah-Essa24

    Joined:
    Apr 17, 2013
    Posts:
    9
    Hi NDesign. I noticed you haven't updated your kit since late 2012. Will there ever be another update?
     
  2. Damo1175

    Damo1175

    Joined:
    Mar 31, 2014
    Posts:
    1
    Where do I go to change: fpskit 2.0 | multiplayer preview v2.8 in the lobby?
     
  3. sezbladex

    sezbladex

    Joined:
    Sep 15, 2013
    Posts:
    22
    hello T chat input code which script file i couldnt find
     
  4. Siom

    Siom

    Joined:
    Feb 5, 2014
    Posts:
    8
    You can make it on script.Edit script lobby and search fps kit 2.0 | multiplayer and change it
     
  5. Amer-ALhwifi

    Amer-ALhwifi

    Joined:
    Jul 4, 2012
    Posts:
    20
    Hello Guys ,
    Does anybody know how the Network firing / reloading sounds are work ?!
    Every Time i've tried to get it worked , i fail ! ( Local Player Hear the sounds perfectly but other Players hear nothing )

    Thanks in Advance !
     
  6. Siom

    Siom

    Joined:
    Feb 5, 2014
    Posts:
    8
    Hi
    Does anyone know why when I have added new weapons is as a player first pearson shooter I see that I have a weapon in the hands of another player but when you look at me you see the same hands that do not hold weapons ... There is also no sound and no visible bullets and gunshot


    Please help me :(
     
  7. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    We need to recreate the ApplyDamage part of the script that we changed to allow hitbox messages.
    How I resolved this problem.

    In HitBox.cs

    Go to this part:
    Code (csharp):
    1. public void ApplyDamage(float damage, string weaponName){
    2.     //So we receive bullet damage and also add other damage value we have configured in PlayerDamage.cs
    3.     playerDamage.TotalDamage(damage + maxDamage, weaponName, message);
    4.     //Debug.Log ("Apply Damage. Damage Value: " + (damage + maxDamage).ToString()); // debugging
    5. }
    Then underneath it add:
    Code (csharp):
    1. void ApplyExplosiveDamage(float damage){
    2.         //So we receive ExplosiveDamage and also add other damage value we have configured in PlayerDamage.cs
    3.         playerDamage.TotalDamage(damage + maxDamage, "", "Explosive");
    4.         //Debug.Log ("Apply Damage. Damage Value: " + (damage + maxDamage).ToString()); // debugging
    5.     }
    then in ExplosionDamage.cs

    where is says:
    Code (csharp):
    1. // Tell the rigidbody or any other script attached to the hit object how much damage is to be applied!
    2. if(!isRemote){
    change this:
    Code (csharp):
    1. hit.SendMessageUpwards("ApplyDamage", hitPoints, SendMessageOptions.DontRequireReceiver);
    to this:
    Code (csharp):
    1. hit.SendMessageUpwards("ApplyExplosiveDamage", hitPoints, SendMessageOptions.DontRequireReceiver);
    then save the changes.

    --- This needs to remain to have explosive damage because it doesn't require a hit box.
     
    Last edited: Apr 8, 2014
  8. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    This is exactly how to fix it. I noticed it was caused by loading in other assets. Some assets changed the original tag for "Remote" to something else.
     
  9. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    I came up with this.

    in RoomMultiPlayerMenu.cs find this:
    Code (csharp):
    1. Hashtable setPlayerDeaths = new Hashtable() {{"Deaths", 0}};
    2. PhotonNetwork.player.SetCustomProperties(setPlayerDeaths);
    add this underneath:
    Code (csharp):
    1. Hashtable setPlayerStreak = new Hashtable () {{"Streaks",0}};
    2. PhotonNetwork.player.SetCustomProperties(setPlayerStreak);
    then find this:
    Code (csharp):
    1. IEnumerator Restart(){
    2. //Reset player properties
    add this underneath:
    Code (csharp):
    1. Hashtable setPlayerStreak = new Hashtable () {{"Streaks",0}};
    2. PhotonNetwork.player.SetCustomProperties(setPlayerStreak); 
    then in WhoKilledWho.cs
    find this:
    Code (csharp):
    1. void PlayerFellDown(string playerName){
    2. photonView.RPC("networkAddMessage", PhotonTargets.All, playerName, "", "fell down", "");
    3. }
    add this underneath:
    Code (csharp):
    1. void PlayerKillStreak(string playerName){
    2. photonView.RPC("networkAddMessage", PhotonTargets.All, playerName, "", "is on a Killing Spree", "");
    3. }
    now in PlayerDamage.cs find this:
    Code (csharp):
    1. int totalKIlls = (int)PhotonNetwork.player.customProperties["Kills"];
    then underneath add this:
    Code (csharp):
    1. int killStreak = (int)PhotonNetwork.player.customProperties["Streaks"];
    2. killStreak ++;
    3. Hashtable setPlayerStreak = new Hashtable() {{"Streaks", killStreak}};
    4. PhotonNetwork.player.SetCustomProperties(setPlayerStreak);
    then find:
    Code (csharp):
    1. //Add team score
    2. int teamScore = new int();
    and add this above it:
    Code (csharp):
    1.  //check if player is on a killing spree and notify other players if true
    2. if(killStreak >= 4){  // set # of kills required before kill streak
    3. //send kill streak notification message to script WhoKilledWho.cs
    4. networkObject.SendMessage("PlayerKillStreak", gameObject.name, SendMessageOptions.DontRequireReceiver);}
    -- i tried editing last night but apparently didnt work -> this line above needs to be gameObject.name not photon.character.name

    then find:
    Code (csharp):
    1. //When player is killed, add 1 to deaths and reset thier killstreak
    2. int totalDeaths = (int)PhotonNetwork.player.customProperties["Deaths"];
    and add this underneath:
    Code (csharp):
    1. int killStreak = (int)PhotonNetwork.player.customProperties["Streaks"];
    2. killStreak = 0;
    3. Hashtable setPlayerStreak = new Hashtable() {{"Streaks", killStreak}};
    4. PhotonNetwork.player.SetCustomProperties(setPlayerStreak);

    *** Using this method however will cause it to broadcast player is on a killing spree starting from when the player begins the streak then rebroadcasting each time during the streak the player kills another player.
     
    Last edited: Apr 9, 2014
  10. sezbladex

    sezbladex

    Joined:
    Sep 15, 2013
    Posts:
    22
    ThrillKill please send me skype adress i need help
     
  11. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    i dont have skype and to be realistic im pretty a novice programmer. I know enough to understand code and modify/change/adapt it for what i want it to do and i can add code from there but not enough to write something like this from scratch. Your probally better off posting here and seeing what help people can provide.
     
  12. myasinay

    myasinay

    Joined:
    Oct 16, 2012
    Posts:
    6
    When players collide in running, they climb to high.
    Why happening this? Sorry for my English. Thank you.
     
    Last edited: Apr 9, 2014
  13. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    Well it looks like somethings wrong with the collider settings. I can't recreate that. Something you have changed with the player prefab or collider sizes?
     
  14. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    This is known bug of the FPS Kit - read post of decerto on page 67
     
  15. myasinay

    myasinay

    Joined:
    Oct 16, 2012
    Posts:
    6
    No, I don't change collider sizes but I change player prefab because I have different soldiers for Team A/Team B. I am sure about my prefab settings. You can see my settings with a video:
    [Video deleted. Problem solved]

    Thanks.
     
    Last edited: Apr 9, 2014
  16. myasinay

    myasinay

    Joined:
    Oct 16, 2012
    Posts:
    6
    Thank you Stan!
    I set step offset to 0 and bug fixed.
     
  17. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    Well there you go, the reason I couldn't recreate because I had fixed before. I know its been said many times before but here is a perfect example why its best to read through all the form posts as you will miss small fixes and unless someone remembers will be out of luck to recreate the same issue to assist.
     
  18. kristoof

    kristoof

    Joined:
    Aug 26, 2013
    Posts:
    89
    please help how i can make a login/register system and a multiplayer scoreboard ?
     
    Last edited: Apr 13, 2014
  19. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    1. Script RoomMultiplayerMenu.cs
    - Add declaration
    Code (csharp):
    1.     [System.Serializable]
    2.     public class PlayerClass{
    3.         public string ClassName;
    4.         public List<string> WeaponName;
    5.     }
    6.    
    7.     public List<PlayerClass> allClasses;
    8.    
    9.     public int playerClassIndex = 0;
    - Add to Awake()
    Code (csharp):
    1. if(PlayerPrefs.HasKey("PlayerClassIndex")){
    2.             playerClassIndex = PlayerPrefs.GetInt("PlayerClassIndex"); 
    3.         }
    - Add to MainMenu (int windowID) (find the best place yourself, I'd suggest after Controls)
    Code (csharp):
    1.         //Select Class *****************************************************************
    2.         GUILayout.BeginHorizontal();
    3.         GUILayout.Label("Class: ", GUILayout.Width(130));
    4.            
    5.         for(int i = 0; i < allClasses.Count; i++)
    6.         {
    7.             if(playerClassIndex == i)
    8.                 GUI.color = Color.green;
    9.             else
    10.                 GUI.color = Color.white;
    11.            
    12.             if(GUILayout.Button(allClasses[i].ClassName, GUILayout.Height(25)))
    13.             {
    14.                 playerClassIndex = i;
    15.                 PlayerPrefs.SetInt("PlayerClassIndex", playerClassIndex);
    16.             }
    17.         }
    18.         GUILayout.EndHorizontal();
    2. Script WeaponManager.cs
    - Update Awake():
    Code (csharp):
    1.     void Awake(){
    2.         for(int i = 0; i < transform.childCount; i++){
    3.             transform.GetChild(i).gameObject.SetActive(true);
    4.         }
    5.         availableWeapons = gameObject.GetComponentsInChildren<WeaponScript>();
    6.         for(int i = 0; i < transform.childCount; i++){
    7.             transform.GetChild(i).gameObject.SetActive(false);
    8.         }
    9.  
    10.         for(int i = 0; i < allWeapons.Count; i++)
    11.         {
    12.             allWeapons[i].gameObject.SetActive(false);
    13.             //check weapons in classes
    14.             RoomMultiplayerMenu rmm = GameObject.Find("__Room").GetComponent<RoomMultiplayerMenu>();
    15.             bool weaponFound = false;
    16.             foreach(string wp in rmm.allClasses[rmm.playerClassIndex].WeaponName)
    17.             {
    18.                 if(allWeapons[i].weaponName.Trim() == wp)
    19.                     weaponFound = true;
    20.             }
    21.             if(!weaponFound)
    22.             {
    23.                 allWeapons.RemoveAt(i);
    24.                 i--;
    25.             }
    26.         }
    27.         TakeFirstWeapon(allWeapons[index].gameObject);
    28.     }
    3. Define classes in RoomMultiplayerMenu:
    $cl.jpg
     
  20. Siom

    Siom

    Joined:
    Feb 5, 2014
    Posts:
    8
    How can make button class which open choice class such as button Controls
     
  21. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
  22. kristoof

    kristoof

    Joined:
    Aug 26, 2013
    Posts:
    89
    how i can make this script change the player name from database if logged in?

    if (w.text == "login-SUCCESS")
    {
    print("WOOOOOOOOOOOOOOO!");
    }
    else
    message += w.text;

    something like this

    if (w.text == "login-SUCCESS")
    {
    changetheplayername;
    }
    else
    message += w.text;

    sorry for my einglish
     
  23. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Take a peek at the main menu scripts and you should have your answer.
     
  24. Amer-ALhwifi

    Amer-ALhwifi

    Joined:
    Jul 4, 2012
    Posts:
    20
    Hello Guys !
    I'm working with this kit and i will use it for my Next project . I got 2 questions if you don't mind .

    - Can i use another hands model ? Like " FPS Handy Hands "

    - How can i make a specific animation for weapon when player is running ?
    Like this :



    Thanks in Advance!
     
    Last edited: Apr 17, 2014
  25. CTPEJIOK22

    CTPEJIOK22

    Joined:
    Sep 4, 2013
    Posts:
    85
    yes. just change hands model, weapon model and animation
     
  26. Siom

    Siom

    Joined:
    Feb 5, 2014
    Posts:
    8
    Hello Guys someone can help me with muzzle flash add to weapon ?
    Im add muzzle flash look on image $help.png and im think is good added.
    On my game muzzle flash when im shooting looks like $help1.png

    Who can help me ?
     
  27. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Uncheck "Static" from MuzzleFlash
     
  28. sezbladex

    sezbladex

    Joined:
    Sep 15, 2013
    Posts:
    22
    How can i make Weapons shop menu ?
     
  29. Siom

    Siom

    Joined:
    Feb 5, 2014
    Posts:
    8
    Im uncheck Static and have the same problem :/
     
  30. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
  31. sezbladex

    sezbladex

    Joined:
    Sep 15, 2013
    Posts:
    22
  32. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    I have been messing around with trying to get a script that could be placed on a prefab vehicle and allow the character to be able to press a key to stop/start the control of the vehicle. Been unsuccessful but figured I'd share what I had so far maybe we could get something started anyone could use to implement into this kit.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. [RequireComponent (typeof (CarController))]    // From the unity project demo Car
    5. public class useVehicle : MonoBehaviour {
    6.    
    7.     public GameObject controller;      // object to hold the player while controlling vehicle
    8.     public bool isinVehicle = false;  // sets player not in vehicle
    9.     GameObject vehicleScript;        // object for vehicle script
    10.     GameObject vehicle;             // object for the HeadNode/Spot
    11.     GameObject hands;             // object for driving hands placement
    12.     public AudioClip startEngine; // start engine sound
    13.     public AudioClip stopEngine; // stop engine sound
    14.     public AudioClip handbrake; // vehicle braking sound
    15.     Transform exitPosition;   // transform position of player getting out of vehicle = predefined on prefab
    16.     Transform seat;          // position of player in drivers seat = predefined on prefab as player Center of Gravity for driving position
    17.     private bool waitTime = false;   // wait time
    18.     public GUISkin mySkin;          // guiskin
    19.     public bool showGui = false;   // sets false to show E to enter vehicle
    20.  
    21.     void  Start (){
    22.         // finds the  player and assigns them to the vehicle controls
    23.         controller = GameObject.FindGameObjectWithTag("Player");  
    24.     }
    25.  
    26.     void  Update (){
    27.         // check if player already in vehicle and if not can get
    28.         if(!isinVehicle) return;
    29.             showGui = true;  // show
    30.             if (Input.GetKey ("e")) {
    31.                     Action (2);
    32.         }else{
    33.             showGui = false;  // dont show
    34.         }
    35.     }
    36.  
    37.     void  OnGUI (){
    38.         GUI.skin = mySkin;
    39.         if(showGui){
    40.             GUI.Label( new Rect(Screen.width - (Screen.width/1.7f),Screen.height - (Screen.height/1.4f),800,100),"Press > E < to Use Vehicle");
    41.         }
    42.     }
    43.  
    44.     void Action(int useTheVehicle){
    45.         // Get and assign CarController.cs
    46.         CarController vScript = vehicleScript.GetComponent<CarController>();
    47.         if(waitTime) return;
    48.         waitTime = true;
    49.         //Get in Vehicle
    50.         if(useTheVehicle == 1){
    51.             StartCoroutine (EnterVehicle());
    52.             controller.transform.eulerAngles = new Vector3(0.0f, vehicleScript.transform.rotation.eulerAngles.y, 0.0f);
    53.             controller.transform.position = transform.position + Vector3.right * 2.0f;
    54.             controller.transform.parent = vehicle.transform;
    55.             vehicleScript.GetComponent<CarController>().controlsEnabled = true;
    56.             vehicleScript.rigidbody.isKinematic = false;
    57.             waitTime = false;
    58.         }
    59.         //Get out of the Vehicle
    60.         if(useTheVehicle == 2){        
    61.             if(vScript.vSpeed < 0.5f){
    62.                 vehicleScript.rigidbody.isKinematic = true;
    63.                 AudioSource.PlayClipAtPoint(handbrake, Camera.main.transform.position);
    64.                 StartCoroutine (brakeWait());
    65.             }          
    66.             StartCoroutine (ExitVehicle ());
    67.             vScript.controlsEnabled = false;
    68.             controller.transform.parent = null;
    69.             controller.transform.eulerAngles = new Vector3(0.0f, vehicleScript.transform.rotation.eulerAngles.y, 0.0f);
    70.             controller.transform.position = exitPosition.position;
    71.             controller.SetActive(true);
    72.             //
    73.             waitTime = false;
    74.         }
    75.         //Player dies inside the vehicle
    76.         if(useTheVehicle == 3){
    77.             vScript.controlsEnabled = false;
    78.             controller.transform.parent = null;
    79.             controller.transform.eulerAngles = new Vector3(0.0f, vehicleScript.transform.rotation.eulerAngles.y, 0.0f);
    80.             controller.transform.position = seat.position;
    81.             controller.SetActive(true);
    82.             StartCoroutine (dieInsideVehicle ());
    83.             controller.SendMessage("ApplyExplosiveDamage", 1000);
    84.         }
    85.     }
    86.  
    87.     IEnumerator brakeWait (){
    88.         yield return new WaitForSeconds(0.7f);
    89.     }
    90.  
    91.     IEnumerator ExitVehicle (){
    92.         AudioSource.PlayClipAtPoint(stopEngine, Camera.main.transform.position);
    93.         vehicle.SetActive(false);
    94.         hands.SetActive(false);
    95.         isinVehicle = false;
    96.         yield return new WaitForSeconds(0.3f);
    97.     }
    98.    
    99.     IEnumerator EnterVehicle (){
    100.         AudioSource.PlayClipAtPoint(startEngine, Camera.main.transform.position);
    101.         controller.SetActive(false);
    102.         vehicle.SetActive(true);
    103.         hands.SetActive(true);
    104.         isinVehicle = true;
    105.         yield return new WaitForSeconds(0.4f);
    106.     }
    107.    
    108.     IEnumerator dieInsideVehicle () {
    109.         vehicle.SetActive(false);
    110.         hands.SetActive(false);
    111.         isinVehicle = false;
    112.         yield return new WaitForSeconds(0.1f);
    113.     }  
    114. }
     
  33. serega990306

    serega990306

    Joined:
    Nov 2, 2013
    Posts:
    9
    I want my shotgun played animation of aim. How can I do it? Only set a tick in front of "Play Animation"? Sorry for stupid question.
     
  34. Steve-of-Construction

    Steve-of-Construction

    Joined:
    Jan 26, 2013
    Posts:
    67
    I've got some troubles with the WhoKilledWho script (WKW).
    If there are more than 2 players, the WKW shows wrong kills.

    Example:
    Player1/Team1 shoots at Player4/same Team1
    Player1 and 4 don't see a kill cause they are same team.

    But Player3/Team 2 notices a kill and WKW says that Player3 has killed Player4 !

    I found these lines in PlayerNetworkController but I don't know if it's a general issue or if I have messed up something else :cry:


    Code (csharp):
    1.  
    2. //Check room game mode
    3.             if(rmm.gameMode == "TDM"){
    4.                 //Check if this player from our team (if so, disable hit damage)
    5.                 if(playerTeam == (string)PhotonNetwork.player.customProperties["TeamName"]){
    6.                     playerDamage.disableDamage = true;
    7.                     drawPlayerName.enabled = true;
    8.                 }else{
    9.                     //But if player from other team, do nto display name
    10.                     playerDamage.disableDamage = false;
    11.                     drawPlayerName.enabled = false;
    12.                 }
    13.             }else{
    14.                 drawPlayerName.enabled = false;
    15.             }
    16.  
     
  35. sezbladex

    sezbladex

    Joined:
    Sep 15, 2013
    Posts:
    22
    guyss where is chat button script code ? which file ? i dont find please help
     
  36. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    We have a few questions to ask before we purchase. If anyone knows the answers that'd be great.

    1) Can this work with the free version of the Photon Networking System?

    2) How easy is it to add custom character, gun, and hand models?

    3) How easy is it to add your own animations for your characters? Can you add animations, such as jump, that aren't in the demos?

    4) Can you add weapon picking up online?

    5) How easy is it to implement custom scripts across the server? (We're developing our own multikill system and would like to test it with multiplayer)
     
    Last edited: Apr 23, 2014
  37. Smartline-Games

    Smartline-Games

    Joined:
    Aug 15, 2013
    Posts:
    67

    1.
    I found something really important about the Photon Cloud servers on this game and other games which used this cloud too.
    The sync (in the demo) isn't working fine. When you see someone shooting (while ping is 4 or lower) it doesn't sound like: bangBangBangBangBang!
    But instead of this, it sounds a bit "stuttering" if you know what I mean. For example take a look at other games like Battlefield is working all fine and smooth, even when the ping is higher than 15. Photon cloud at all hasn't a smooth system or this kit neither.

    I compared this to Unity networking and Photon Cloud. I started with Unity networking, until the servers where down I switched to Photon. Photon doesn't seem so smooth as it looks like :(




    5. Yeahaw. :p
     
  38. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Yes works for both free 20 ccu cloud and 100 ccu server
    Not too hard if you familiar with Unity, however it takes some time for tweaking weapon position, assign scripts, create hit boxes, etc. Documentation does not cover all little things and you'll need to take a look how it's done for the included model.
    Pretty easy for both 1st person and 3rd person. I've added run, jump and idle animations for hands, and lots of other animations for the 3rd person including jump.
    Yes but it requires some changes in code. Weapon pickup script included in the package is for single player
    Easy. If you mean "Onyx ranking", all you need to do is update PlayerDamage.cs script(add kill streak and xp vars and pass them to your script)
     
    Last edited: Apr 23, 2014
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for the help. It sounds like we made the right choice in picking this system.

    We are setting things up at the moment. However, we are having a few problems. We are using the Bootcamp soldier model for now and have setup everything just like the demo network player, but the animations aren't working online.

    We are also getting this error:
    We have assigned the WeaponSync_Catcher script to all of the weapons (we are suing the same ones from the demo for now and have positioned them to our player like we're supposed to) but we keep getting the above error after a player shoots or dies online. It looks like that scripts get detached from the weapons when we start playing.

    Any help fixing this issue would be appreciated.
     
    Last edited: Apr 24, 2014
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for this, we fixed the WeaponSync_Catcher script error. We had to add the weapon script to both the 3rd person and first person. Now we're having more issues.
    I think the animations are not working due to the null references.
     
    Last edited: Apr 24, 2014
  41. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Not sure but try to comment the following code of PlayerNetworkController.cs:
    Code (csharp):
    1.                 if(!mixedAnimations.Contains(currentBlendedAnimation)  currentBlendedAnimation != "Null"  headLookController.animation[currentBlendedAnimation] != null){
    2.                     headLookController.animation[currentBlendedAnimation].layer = 4;
    3.                     headLookController.animation[currentBlendedAnimation].wrapMode = WrapMode.Loop;
    4.                     headLookController.animation[currentBlendedAnimation].AddMixingTransform(shoulderR);
    5.                     headLookController.animation[currentBlendedAnimation].AddMixingTransform(shoulderL);   
    6.                     mixedAnimations.Add (currentBlendedAnimation);
    Not sure again but check if you assign the following in 3rd person model:
    $fps.jpg
     
  42. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Does not make sense for me - it's GUI. What is in line 555?
    I have:
    GUILayout.Label("Kills: " + ((int)player.customProperties["Kills"]).ToString(), GUILayout.Width(115));
     
  43. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I'm not sure, but it was do to the Fire Points not being set right. Now they are and all the problems except for the animations are fixed.

    I tried commenting out the lines you suggested, but the animations still aren't working properly. There are no errors so I'm not sure what's causing the issue.
     
  44. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    PM me
     
  45. Steve-of-Construction

    Steve-of-Construction

    Joined:
    Jan 26, 2013
    Posts:
    67
    Please can someone help, I have an issue with WhoKilledWho script.
    The problem: if there are 2 players (A+B) joining team 1 everything seems ok.
    They can't kill themselves cause they are teammates.

    But once another player (C) joins team2 they can 'team-kill' but WhoKillWho say that player C has killed.

    I think this happens because player C sends a message to WkW but I can't figure out why this happens.
    Any ideas would be much appreciated.

    Please this is very important for a monster project I'm working on for more than a year now and I spent lots of hours but couldn't find the mistake.
    It's for sure a problem with my code. I've made lot of changes to fit the game, but the main things are not touched. In FPS-Kit this works fine so there may be just a small line of code accidentially be broken.

    I'm using FPS-Kit 2.0 version 1.5 with lots of improvements.
    Some code was converted from version 2.8 and everything else works fine.
    The only thing I couldn't add right now is this line in PlayerDamage.cs (cause of v1.5's photon files):

    Code (csharp):
    1. using Hashtable = ExitGames.Client.Photon.Hashtable;
    Could this line produce the error?

    If you want to take a look at my game or download a demo: www.eod-game.com

    It's a Vietnam War FPS shooter and it was originally a modification for Battlefield series.
    The demo is just a WIP demo and the level has not been optimized, so it will just work on actual PC.

    The game is working with Unity's mecanim animations, has jets, boats, ships, cars, trucks, APC's, helicopters, bombers, allied and axis teams (Vietcong, NVA, Pathet Laos, USA, ARVN, Australians, French), different soldier classes (medic can heal, engineer can repair) and lots of never seen stuff in any game.

    $news0004.jpg

    $news0003.jpg
     
    Last edited: Apr 24, 2014
  46. Le_Hieu

    Le_Hieu

    Joined:
    Mar 26, 2011
    Posts:
    31
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    How does the weapon pickup (Add) work? We can't seem to get it to work. We keep getting an array out of index error even though there's the right amount of elements.
     
  48. Steve-of-Construction

    Steve-of-Construction

    Joined:
    Jan 26, 2013
    Posts:
    67
    Your pickup-weapon has a (trigger) sphere collider and the 'PickUp' tag.
    Save it as prefab.

    Now add the prefab to the players Weapon Pick Up list.

    Finally add the weapon to the player.

    Once your player goes into sphere collider you can pickup the weapon.
    It's important that the prefab has the same name like the weapon in WeaponManager and the Weapon Name in WeaponScript!

    So if you have for example a Revolver, the pickup prefab, the weapon in WeaponManager and the Weapon Name in Weaponscript shoult be named 'Revolver'. A simple typo can destroy everything!
     
  49. nertworks

    nertworks

    Joined:
    Mar 6, 2014
    Posts:
    21
    2 Questions for the Developer.

    1. How do I remove the list of weapons on the top of the GUI. I cannot seem to locate where it's echoing that.
    2. How do I edit/remove the part on the right side that tells you which player has connected.

    I really appreciate your help.
     
  50. TheBorDr

    TheBorDr

    Joined:
    Oct 14, 2012
    Posts:
    15
    Asked this a while ago, but never got an answer.

    The variables 'noAimErrorAngle' and 'AimErrorAngle' seem to do nothing in the gunscript. Accuracy is always perfect- this is a major bug, and I have not been able to find out what causes it. It isn't just in my project, either- it is in Ndesign's multiplayer demo, and it persists even if I reimport the package.

    Anyone have this problem, and does anyone have a solution to this?