Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

FPS Kit | Version 2.0

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

  1. rpg_gamer

    rpg_gamer

    Joined:
    Nov 28, 2012
    Posts:
    206
    Code (CSharp):
    1.     StartCoroutine(weapManager.SwitchWeapons(weapManager.allWeapons[0].gameObject, weapManager.allWeapons[0].gameObject));
    2.             weapManager.allWeapons[1] = newWeapon;

    closer still.. but still not quite.
     
  2. crimn

    crimn

    Joined:
    Jan 8, 2013
    Posts:
    24
    Hi can you help me with this?
    How to make the Explosion script to don't make dmg when player is behind wall or something?

    Code (CSharp):
    1. //NSdesignGames @ 2012 - 2014
    2. //FPS Kit | Version 2.0
    3.  
    4. using UnityEngine;
    5. using System.Collections;
    6.  
    7. public class ExplosionDamage : MonoBehaviour {
    8.     public float explosionRadius = 5.0f;
    9.     public float explosionPower = 10.0f;
    10.     public float explosionDamage = 100.0f;
    11.     public float explosionTimeout = 2.0f;
    12.     GameObject player1;
    13.     [HideInInspector]
    14.     public bool isRemote; //If explosion is remote do not deal any damage
    15.    
    16.     IEnumerator Start () {
    17.         Vector3 explosionPosition = transform.position;
    18.        
    19.         // Apply damage to close by objects first
    20.         Collider[] colliders = Physics.OverlapSphere (explosionPosition, explosionRadius);
    21.         foreach (Collider hit in colliders) {
    22.             // Calculate distance from the explosion position to the closest point on the collider
    23.             Vector3 closestPoint = hit.ClosestPointOnBounds(explosionPosition);
    24.             float distance = Vector3.Distance(closestPoint, explosionPosition);
    25.            
    26.             // The hit points we apply fall decrease with distance from the explosion point
    27.             float hitPoints = 1.0f - Mathf.Clamp01(distance / explosionRadius);
    28.             hitPoints *= explosionDamage;
    29.            
    30.             // Tell the rigidbody or any other script attached to the hit object how much damage is to be applied!
    31.             if(!isRemote){
    32.  
    33.            
    34.                 hit.SendMessageUpwards("ApplyDamage", hitPoints, SendMessageOptions.DontRequireReceiver);
    35.             }
    36.         }
    37.        
    38.         // Apply explosion forzces to all rigidbodies
    39.         // This needs to be in two steps for ragdolls to work correctly.
    40.         // (Enemies are first turned into ragdolls with ApplyDamage then we apply forces to all the spawned body parts)
    41.         colliders = Physics.OverlapSphere (explosionPosition, explosionRadius);
    42.         foreach (Collider hit in colliders) {
    43.             if (hit.rigidbody){
    44.                 hit.rigidbody.AddExplosionForce(explosionPower, explosionPosition, explosionRadius, 3.0f);
    45.             }
    46.         }
    47.        
    48.         // stop emitting particles
    49.         if (particleEmitter) {
    50.             particleEmitter.emit = true;
    51.             yield return new WaitForSeconds(0.5f);
    52.             particleEmitter.emit = false;
    53.         }
    54.        
    55.         Destroy (gameObject, explosionTimeout);
    56.     }
    57. }
    58.  
     
  3. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    114
    I have a question :
     
  4. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Because the kit does not use simple look animations, it's trying to dynamically set the rotation of the torso to match the look direction which doesn't work quite right (particularly at the extremes of aiming up and down)
     
  5. hluper

    hluper

    Joined:
    Jun 25, 2013
    Posts:
    16
    Hi,

    I made it to step 7 on your "Tutorial Setup New Weapon.pdf " and i can't seem to fin 'WeaponScript', Any reasons why it's not there or tips how to make it show up?

    Thanks in advance.
     
  6. yoash

    yoash

    Joined:
    Sep 3, 2013
    Posts:
    36
    Hi guys,

    Looking to pay someone to help me, just need to replace the weapons for networkplayer prefab to some new ones, including their animations. Basically just this tutorial: http://www.mediafire.com/view/?ko70h4f8wc8db2d )

    I only need 6 new weapons added from the following pack, and they fit in with the weapon types already in FPS kit: http://www.thegamecreators.com/?m=view_product&id=2037 (id use asset store weapons instead if that's easier and there is a decently priced pack that you suggest)

    I will send you the pack and you just add them to a networkplayer prefab then send it back to me so I can add it to my game.

    Let me know if you can do this.. I'll pay you for your time.
     
  7. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    Sending a paid pack to someone who does not legally own it is illegal, and besides its not at all hard to replace the default network player weapons with new ones.
     
  8. yoash

    yoash

    Joined:
    Sep 3, 2013
    Posts:
    36
    Does anyone know specifically which part of the original tutorial for changing weapons might be outdated? I think the pack was partly js when that was written.

    Been trying to swap the original weapons for some weapons models with no hands, but can't seem to work out how to do it.
     
  9. Polk

    Polk

    Joined:
    Oct 8, 2013
    Posts:
    1
  10. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    What exactly are you having trouble with? Making new weapons is extremely easy.
     
  11. crimn

    crimn

    Joined:
    Jan 8, 2013
    Posts:
    24
    Hi all, i am developer of this game http://www.pacogames.com/action/pixel-warfare/en that has ove 2,000,000 plays for one mounth , and use this FPS Kit engine, i will make other game, but i am alone and i have many things to do and i don't have time to spend for some script and making them beter, if some one wants to be part from the game, and help me with this script, i will add his name in the main menu credits,thanks

    How to make the Explosion script to don't make dmg when player is behind wall?

    Code (CSharp):
    1.         //NSdesignGames @ 2012 - 2014
    2.         //FPS Kit | Version 2.0
    3.        
    4.         using UnityEngine;
    5.         using System.Collections;
    6.        
    7.         public class ExplosionDamage : MonoBehaviour {
    8.             public float explosionRadius = 5.0f;
    9.             public float explosionPower = 10.0f;
    10.             public float explosionDamage = 100.0f;
    11.             public float explosionTimeout = 2.0f;
    12.             GameObject player1;
    13.             [HideInInspector]
    14.             public bool isRemote; //If explosion is remote do not deal any damage
    15.          
    16.             IEnumerator Start () {
    17.                 Vector3 explosionPosition = transform.position;
    18.              
    19.                 // Apply damage to close by objects first
    20.                 Collider[] colliders = Physics.OverlapSphere (explosionPosition, explosionRadius);
    21.                 foreach (Collider hit in colliders) {
    22.                     // Calculate distance from the explosion position to the closest point on the collider
    23.                     Vector3 closestPoint = hit.ClosestPointOnBounds(explosionPosition);
    24.                     float distance = Vector3.Distance(closestPoint, explosionPosition);
    25.                  
    26.                     // The hit points we apply fall decrease with distance from the explosion point
    27.                     float hitPoints = 1.0f - Mathf.Clamp01(distance / explosionRadius);
    28.                     hitPoints *= explosionDamage;
    29.                  
    30.                     // Tell the rigidbody or any other script attached to the hit object how much damage is to be applied!
    31.                     if(!isRemote){
    32.        
    33.                  
    34.                         hit.SendMessageUpwards("ApplyDamage", hitPoints, SendMessageOptions.DontRequireReceiver);
    35.                     }
    36.                 }
    37.              
    38.                 // Apply explosion forzces to all rigidbodies
    39.                 // This needs to be in two steps for ragdolls to work correctly.
    40.                 // (Enemies are first turned into ragdolls with ApplyDamage then we apply forces to all the spawned body parts)
    41.                 colliders = Physics.OverlapSphere (explosionPosition, explosionRadius);
    42.                 foreach (Collider hit in colliders) {
    43.                     if (hit.rigidbody){
    44.                         hit.rigidbody.AddExplosionForce(explosionPower, explosionPosition, explosionRadius, 3.0f);
    45.                     }
    46.                 }
    47.              
    48.                 // stop emitting particles
    49.                 if (particleEmitter) {
    50.                     particleEmitter.emit = true;
    51.                     yield return new WaitForSeconds(0.5f);
    52.                     particleEmitter.emit = false;
    53.                 }
    54.              
    55.                 Destroy (gameObject, explosionTimeout);
    56.             }
    57.         }
    58.        
    59.  
    60.  
     
  12. thecookie12

    thecookie12

    Joined:
    Aug 10, 2012
    Posts:
    41
    How can I add joysticks to the characters and make them mobile?
     
  13. Dalejones87

    Dalejones87

    Joined:
    Sep 25, 2014
    Posts:
    1
    Im having a problem adding my own characters, adding weapons worked fine but the animations for my character just wont play ingame, i followed the tutorials but no luck, any help would be apreciated. would it be possible to do tutorial videos as well as the documentation?
     
  14. thomas80550

    thomas80550

    Joined:
    May 7, 2014
    Posts:
    16
    Good evening when players return in how it flies debug this?
     
  15. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    You're going have to rephrase your question. It makes no sense at all.
     
  16. thomas80550

    thomas80550

    Joined:
    May 7, 2014
    Posts:
    16
    players flying in touch
     
  17. thomas80550

    thomas80550

    Joined:
    May 7, 2014
    Posts:
    16
    up players flying in touch
     
  18. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
  19. SunixDev

    SunixDev

    Joined:
    Mar 1, 2014
    Posts:
    17

    Thank You !!!
     
  20. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    492
    Hello everyone,

    Sorry for not being active here, been really busy recently and wasn't able to offer as much support as before. Thanks to everyone who been active on this topic and helped others with useful info.
    Since I can't offer as much support I will have to remove FPS Kit 2.0, going to email Asset Store team at the end of this month regarding removal.

    But I may be back next year with new version of multiplayer kit which wouldn't be limited to FPS only, but would work with any other type of game
     
    Last edited: Nov 18, 2014
  21. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    114


    nice i wait new version in next year from you !
    how long you upload a new version ? we can have a date ?
    i just send for you a
    Conversations please check !

     
  22. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    "draw restarting" ?? i have problem with this all time, anny fix??
     
  23. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    and how to change amo from RPG 20 to 1
     
  24. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    121
    PEOPLE! Stop asking him to make your game, read the documentations first then ask questions.
     
  25. DylaNemesis

    DylaNemesis

    Joined:
    Oct 13, 2012
    Posts:
    7
  26. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    i read doc and i need a video to change character and add more weapon
     
  27. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    plzz all help me somebody to change mesh and weapon on fps kit 2.0
     
  28. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    i have another big problem DRAW RESTARTING , wen finish round remain like this and never start round again
    anybody know how to fix this?
     
  29. GameDev_John

    GameDev_John

    Joined:
    May 28, 2012
    Posts:
    19
    I paid for the pack I should be able to at least download it from somewhere....
     
  30. aidengaming123

    aidengaming123

    Joined:
    Apr 19, 2013
    Posts:
    52
    I imported the package into a Unity Project with PUN already imported, which broke the Photon View on the Network Player. I thought it was no big deal, and set the component but now it says the Owner is the Scene and not "Set at Runtime". How do I fix this? I already made a ton of alterations to the game before realizing this is a problem, as the players don't actually sync at the network.
     
  31. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    use unity 4.5 and import package with pun from fps kit 2.0
     
  32. aidengaming123

    aidengaming123

    Joined:
    Apr 19, 2013
    Posts:
    52
    So there's no way to fix it unless completely reimporting?
    S***. Alright.
     
  33. decerto

    decerto

    Joined:
    Jun 1, 2012
    Posts:
    126
    Any plans on letting users carry on supporting this kit? As someone who knows the kit inside out, I'd love to keep supporting the kit for users and adding new features.
     
  34. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    if you make this kit like cod4 multiplayer mod like . zombie mod. alien mod. gun mod . 2 character different . a video how to change weapon and character. like cod 4 air strike call . helicopter call. kill 5 players call air strike . kill 7 players call helicopters and more stuff cull
     
  35. aidengaming123

    aidengaming123

    Joined:
    Apr 19, 2013
    Posts:
    52
    Another question, I'm trying to test out explosions doing damage to the player, so I figured for debugging I'd just copy (from explosiondamage.cs)
    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){
    3.                 hit.SendMessageUpwards("ApplyDamage", hitPoints, SendMessageOptions.DontRequireReceiver);
    4.             }
    and paste right under it, taking away the not. Making this:
    Code (CSharp):
    1. if(isRemote){
    2.                 hit.SendMessageUpwards("ApplyDamage", hitPoints, SendMessageOptions.DontRequireReceiver);
    3.             }
    Now, after looking over the code I thought this would work, but the explosions still do not do any damage to the local character. Does anyone know how to do this?
     
  36. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    also i have this error
    NullReferenceException: Object reference not set to an instance of an object
    RoomMultiplayerMenu.Awake () (at Assets/FPS Kit 2.0 C#/_CustomAssets/Scripts/Network/RoomMultiplayerMenu.cs:111)
     
  37. Smartline-Games

    Smartline-Games

    Joined:
    Aug 15, 2013
    Posts:
    67
    I'd have an idea if this topic isn't going to be 'dead' at all.
    When you go back a few pages, you'll may find the post from Stan B. and his Class system.
    It would be nice if there's a possibility to make it more advanced.

    For example;
    When you play on a server with Deathmatch Gamemode, you should be able to select these classes:
    Assault | Support | Medic

    ...And when playing on a server with TDM Gamemode, it would be like this:
    Decerto | Heavy Gunner | Spec Ops
     
  38. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    this is a good idea , like in cod4 zombie mode
     
  39. Smartline-Games

    Smartline-Games

    Joined:
    Aug 15, 2013
    Posts:
    67
    Argh, you probaly don't understand what I'm trying to say (at least if you're talking about my last post).
     
  40. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    use google
     
  41. Drymarti111

    Drymarti111

    Joined:
    Jun 23, 2013
    Posts:
    158
    Ok, got a package. I'm trying to make again a ongui score after kill each other
     
  42. Drymarti111

    Drymarti111

    Joined:
    Jun 23, 2013
    Posts:
    158
    Ok Decerto, You did it for me long time ago, and I lost my project. Do you know how to make a showing a "Kill P layer+100" after killing players? or ongui picture/text
     
  43. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    hello i s anybody here to help me how to change character and weapon with animation to work?, my id skype or yahoo mesenger is MENTOLATUX, plzz add me and help me , if you help me with this i give you another idea how to make a good website to show in google search on a first page .
     
  44. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    mentolatux, Drymarti111
    Project is discontinued and this thread must die
    "noobs are back hoping somebody will make their game for them :("
     
    Justice0Juic3 and DylaNemesis like this.
  45. DylaNemesis

    DylaNemesis

    Joined:
    Oct 13, 2012
    Posts:
    7
    Stan B i love how you tried to be nice and post your work and a lot of the newbs here tried to get more out of you. i loved your posts and they where simple to understand but hey some noobs where greedy.
     
  46. DylaNemesis

    DylaNemesis

    Joined:
    Oct 13, 2012
    Posts:
    7
    I don't want to sound like a noob but I've seen enough mobile games made with this kit to wonder. is there a tutorial on that or is it just making the onscreen screen buttons with a unity kit
     
  47. DylaNemesis

    DylaNemesis

    Joined:
    Oct 13, 2012
    Posts:
    7
    lol idiot self found the answer with a quick search
     
  48. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    233
    i´m not a nob, i´m beginer on unity and this kind of forum is for learn so go to other forum and talk with intelligence people .
     
  49. Drymarti111

    Drymarti111

    Joined:
    Jun 23, 2013
    Posts:
    158
    Not noobs, I know how to do that right now. You are right that thread must die
     
  50. yoash

    yoash

    Joined:
    Sep 3, 2013
    Posts:
    36
    Im having trouble replacing the network player character model.. Any up for helping me if I supply the models? I can pay via Paypal for your help. Send me a PM.
     
    Vasilkb likes this.