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
    You can create another array storing all available weapons.
    Then show them on display and let player select 5 of them.
    Assign each selected weapon to "All Weapons" at WeaponManager.cs

    It's not really an easy task, you can either do it by yourself or hire freelancer which is probably not free.

    Cheers!
     
  2. PixelPaw

    PixelPaw

    Joined:
    Feb 18, 2013
    Posts:
    91
    Wasn't really clear before .. here is my problem ,
    $NormalShot.jpg
    that is a normal shot .. right on target no problem there.
    $IronSightAim.jpg
    here I'm aiming with iron sight right on the target..
    $ShotsAreWayOff.jpg
    as you can see shots are way off target , I cant position iron sight straight and be aligned for the shot with aim position settings.
    How could I move aim aligned with shots do I need to modify script or is there a simpler way I'm just missing?
     
  3. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    You can tweak iron sights position in Play mode.
    When you pressed aim button, select weapon you currently using, find WeaponScript attached.
    There you will see Aim Position Vector3, tweak it till it feels right.
    Now open NotePad or any text editor and paste new values.
    Quit from play mode, drag and drop NetworkPlayer.
    Select weapon you just tweaked and paste new values.
    Save prefab.
     
  4. BL Studios

    BL Studios

    Joined:
    Feb 18, 2014
    Posts:
    11
    hello.

    I hope you can guide me a little, what I want is that the accounts of WKW, appears the name of the weapon that killed the player, could give me some information on how to do this please.
     
  5. PixelPaw

    PixelPaw

    Joined:
    Feb 18, 2013
    Posts:
    91
    Yes that is what I did to have iron sight aligned properly , but as you can see when iron sight is aligned straight , shots are not going where iron sight is aiming ... If I put in values so that the gun points where shots land iron sight is not aligned anymore.
     
  6. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Shots are not aligned to iron sights, but to center of screen.
    You can shoot in aim mode and than align irosights according to impact hole (Take recoil in account)
     
  7. PixelPaw

    PixelPaw

    Joined:
    Feb 18, 2013
    Posts:
    91
    if I align iron sight to impact hole gun is going to be in diagonal the backend of the gun wont be in line with the tip ....
    that is the problem :sad:
     
  8. midorina

    midorina

    Joined:
    Jun 1, 2012
    Posts:
    131
    I don't know if this was answered as I've asked this before, but does anyone know how to keep the Photon Room active when ALL players have disconnected?

    Any help would be greatly appreciated!
     
  9. BL Studios

    BL Studios

    Joined:
    Feb 18, 2014
    Posts:
    11
    I hope you can guide me a little, what I want is that the accounts of WKW, appears the name of the weapon that killed the player, could give me some information on how to do this please. :(
     
  10. drakekaz

    drakekaz

    Joined:
    Jan 16, 2014
    Posts:
    43
    Thanks, does it matter what Element I name "Remote"?
     
  11. drakekaz

    drakekaz

    Joined:
    Jan 16, 2014
    Posts:
    43
    I am also having a strange problem where you can see players move around but you cant hurt them. You can only hurt them in the position where they spawn. Even if they are not standing there anymore.
     
  12. Essekey

    Essekey

    Joined:
    Nov 6, 2013
    Posts:
    15
  13. worldofcars

    worldofcars

    Joined:
    Jul 21, 2012
    Posts:
    20
    _

    Do you want to earn money with your own animated weapons for FPS KIT 2.0?

    I am the leading developer of Army Force Online, a 3D Multiplayer FPS developed with FPS KIT 2.0. Since we have not much time to animate many weapons for our game, we want to buy animated weapons from developers who are also working with FPS KIT 2.0.

    If you are working in your game with the FPS KIT 2.0 and if you have animated new weapons for this kit and want to earn some money, you can sell your animated weapons to us and still use them in your own game.

    We pay:
    $20 for each weapon if you sell it to us and can use it still in your own game
    $25 for each weapon if you sell it to us and don't use it anymore in your own game


    We pay only via PAYPAL!

    In brief, this means, if you have developed for example 10 new weapons for your own game and sell these 10 weapons to us, you can earn $200 and you can still use them in your own game.

    Important: The weapons have to be animated with the same arms as the arms of the FPS KIT 2.0.

    For more information, or if you are interested, please contact us here:
    - Private message to "worldofcars" in unity forum
    or
    - Email to: help@armyforceonline.com
     
  14. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Network part is more complicated. You'll need to add surface type variable to the PhotonSerializeView of PlayerNetworkController.cs, pass this surface type from FPSSoundController.cs and do the similar logic like "if (surface == "Dirt")..."
    Is it the last thing to do in your game? I'd say it's the latest item to implement in my shopping list for the final release(I even not sure if I need network steps there). Did you finish your UI,weapon manager, game modes and models?

    P.S. UI is very basic in this kit and needs lots of work, in other words it should be re-written from the scratch. I do not recommend this kit for the beginners, it looks promising but without development background you'll just clone existing kit making another ugly "game".
     
    Last edited: Feb 21, 2014
  15. mirzinho

    mirzinho

    Joined:
    Feb 19, 2014
    Posts:
    3
    Is there any way to run multiplayer game without using PhotonCloud, just using my own servers?

    Thank you.
     
  16. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Yes you can use your own photon server. To change FPS Kit to work with self-hosting follow these steps:
    - Open Window - Photon Unity Networking
    - Click Setup
    - Click Open self-hosting settings
    - Change IP address and port there and click Save
     
  17. mirzinho

    mirzinho

    Joined:
    Feb 19, 2014
    Posts:
    3
    thank you
     
  18. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Hi NSdesignGames

    There is a minor bug in both old and new version of FPS kit. If you return back from the crouch first person model is bigger and another players look smaller then before crouch.

    Edit: It seems that changing "Character Controller" height from 2.2 to 1.9 fixes the problem, but it may affects another behavior as well. NSdesignGames please advice

    Before
    $before_crouch.jpg
    After(I did not move mouse)
    $after_crouch.jpg
     
    Last edited: Feb 22, 2014
  19. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey,

    Indeed, thanks for reporting.

    If someone need here is quick fix:

    - Open FPSController.cs

    - Add new variable
    Code (csharp):
    1. float defaultCamPosY = 0;
    - Add this to void Awake
    Code (csharp):
    1. defaultCamPosY = lookObj.transform.localPosition.y;
    - Scroll down till line 523 which starts with "lookObj.transform.localPosition = new Vector3"
    Replace that line with this:

    Code (csharp):
    1. lookObj.transform.localPosition = new Vector3(lookObj.transform.localPosition.x, Mathf.Lerp(lookObj.transform.localPosition.y, defaultCamPosY, Time.deltaTime/movement.crouchSmooth), lookObj.transform.localPosition.z);
     
    Last edited: Feb 22, 2014
  20. IM_A_CAT_AMA

    IM_A_CAT_AMA

    Joined:
    Feb 22, 2014
    Posts:
    11
    Does the multiplayer work locally as well?
     
  21. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Yes if you install photon server locally.
     
  22. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Fixed! Thanks!
     
  23. PixelPaw

    PixelPaw

    Joined:
    Feb 18, 2013
    Posts:
    91
    Hey I just tried this out but as soon as my character moves step sounds just keep going on if I crouch or run I can hear steps going slower or faster but if character stops sounds just keep going on forever any idea what would be causing this ? thx
     
  24. BL Studios

    BL Studios

    Joined:
    Feb 18, 2014
    Posts:
    11
    hello.

    I have some problems to add new animations to "characterAnimation".

    I have two animations in my character more ("fire" and "reload") which I be played back it when I have pressed "Fire1" and "R" ... but the error is that by placing these animations in the script animations are played even if I do not have any button or key pressed.

    I try like this:

    Code (csharp):
    1. if(action == Action.Stand){
    2.         if(fpsController.grounded){
    3.             if(fpsController.Walking){
    4.                 if(!fpsController.Running){
    5.                     animationType.name = "Walking";
    6.  
    7. //bla bla bla
    8. else if( Input.GetKey(KeyCode.R) ){
    9.                         animation.CrossFade(Animations.Reload.name, 0.2);
    10.                         //Send animation name (needed for multiplayer)
    11.                         animationForHands.name = Animations.Reload.name;
    12.  
    13. //bla bla bla
    14.  
    15. if(Animations.Reload){
    16.         animation[Animations.Reload.name].wrapMode = WrapMode.Once;
    17.  
    I tried that, but seems to serve me, can you help.
     
  25. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    I've tested this change again with the original C# version of the kit and it worked as expected. Check if you have any idle animation without word "idle" in your project. In this case condition if(!currentAnimation.Contains("Idle")) will not work
     
  26. PixelPaw

    PixelPaw

    Joined:
    Feb 18, 2013
    Posts:
    91
    i love you ! :d
     
  27. eliteslayer

    eliteslayer

    Joined:
    May 12, 2013
    Posts:
    64
    Can anybody help with this,
    Since i've changed the room script to two players on for each team, the controls have been getting messed up like to shoot the gun you can either click on LMB or the left control which u normally crouch with. Some other controls are also messed up to but i am not going to go into detail with evrything that is messing up. So if there is a way to fix this please let me know. Also is there a way to be able to change the controls to shoot, move around and crouch in an options menu in game? Thanks.
     
  28. technotdc

    technotdc

    Joined:
    Oct 21, 2011
    Posts:
    60
    Hi....
    I create a box....(tag "blood" ) and have this script (I want to destroy when i shoot)

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class DamageEnemy : MonoBehaviour {
    6. public float hp = 100;
    7.  
    8.     // Use this for initialization
    9.     void Start () {
    10.  
    11.     }
    12.    
    13.     // Update is called once per frame
    14.     void Update () {
    15.  
    16. }
    17.  
    18.      void  ApplyDamage ( float damage  ){
    19.     hp -= damage;
    20.     if(hp <= 0){
    21.     Destroy(gameObject);
    22.     }
    23.     }
    24.    
    25.     }
    26.  
    But nothing happend when I shoot it........

    edit : Also I have this line at bullet script

    Code (csharp):
    1.  
    2. if(hit.transform.tag == "Blood" ) {
    3.                 hit.transform.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver);
    4.             }
     
    Last edited: Feb 24, 2014
  29. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Make sure tag is "Blood" and not "blood"
     
  30. technotdc

    technotdc

    Joined:
    Oct 21, 2011
    Posts:
    60
    yes.......is "Blood"......sure


    EDIT : Fixed (the problem was in bullet script)


    Thanks ¡¡
     
    Last edited: Feb 24, 2014
  31. PixelPaw

    PixelPaw

    Joined:
    Feb 18, 2013
    Posts:
    91
    Sorry newb question :p

    I'm trying to have a different sound play for a different weapon (handgun) , I made a different tag and a different blood prefab for the chest box collider and added a collider with trigger checked but I don't want other weapons to play that sound so I made a handgun bullet prefab with this script attached...




    using UnityEngine;
    using System.Collections;

    public class ChestShotHandgun : MonoBehaviour {
    public AudioClip[]ChestShotHandgun;


    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void Update () {

    }
    void OnTriggerEnter(Collider gameObject)
    {
    if (gameObject.tag == "ChestBlood")
    {
    audio.Play();
    }
    else audio.Stop();
    }

    }

    I get no error but nothing happens , for other weapons i just simply put audio source on the chest blood prefab with play on awake...
    But what am i missing for it to play the sound when bullet hits trigger collider ?
     
  32. serega990306

    serega990306

    Joined:
    Nov 2, 2013
    Posts:
    9
    I bought your fps kit, its great but I have some questions.
    How can I add new game mods(for example capture the flag or control point, how it was in call of duty)? And how can I change the scope of sniper rifle(it doesnt look fabulous)?
     
  33. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey,

    About capture the flag mode, you can find an example on how to add points to team when you step inside an area.
    Example script located at front post under "Add points to our team when walking inside trigger area (Example: Capture the flag)".
    This is a simple example so you will have to modify it to fit your needs.

    To change sniper scope select sniper from NetworkPlayer prefab which have WeaponScript.cs attached, there should be another script attached which have variable for scope texture.

    Cheers!
     
  34. BL Studios

    BL Studios

    Joined:
    Feb 18, 2014
    Posts:
    11
    as I make it work the animation "fire" and reload "of CharacterAnimation.js...?
     
  35. des43

    des43

    Joined:
    May 30, 2013
    Posts:
    23
    found a bug in the MultiPlayerChat.cs who can give normal
     
  36. des43

    des43

    Joined:
    May 30, 2013
    Posts:
    23
    script to trigger on withdrawal xn and the player died
     
  37. des43

    des43

    Joined:
    May 30, 2013
    Posts:
    23
    sorry for my English I use translate
     
  38. BL Studios

    BL Studios

    Joined:
    Feb 18, 2014
    Posts:
    11
    help me please.
     
  39. mirzinho

    mirzinho

    Joined:
    Feb 19, 2014
    Posts:
    3
    Hello,

    i have seen a post on the asset store that there will be a new version completely done in C# , can you give me the info on the release date of that version.

    Cheers
     
  40. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    496
    Hey,

    This update has been released. Check Asset Store page.

    Cheers!
     
  41. rpg_gamer

    rpg_gamer

    Joined:
    Nov 28, 2012
    Posts:
    214
    hi there, how do you set it so the player starts with no weapons..... and has to pick up any weapons he finds? by default he has all weapons.... thanks!


    I can't quite seem the player to start out with no weapons...

    i go to the weapon manager, but am not sure if i am supposed to set all the fields to none, or reduce the size to zero.

    if i do that it seems when i set out a pickup weapon the player cannot pick it up.

    how do i properly set it up so the player starts with nothing, and has to pick up his weaps? thanks!
     
    Last edited: Mar 2, 2014
  42. ik_jolan

    ik_jolan

    Joined:
    Jul 26, 2013
    Posts:
    15
    Hi,
    I want that all players can see flashlights (need this for a minigame)
    I found this on page 49:

    but I do not know how to do this...
    Anybody who can help me?

    I also want my medic kits to be visible for other players
     
    Last edited: Mar 3, 2014
  43. serega990306

    serega990306

    Joined:
    Nov 2, 2013
    Posts:
    9
    Can I change weapon of your kit? I want to put more detailed weapons. Can i do it myself? And if i can, how?
     
  44. ik_jolan

    ik_jolan

    Joined:
    Jul 26, 2013
    Posts:
    15
  45. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    hie guys, I'm have the JS C# version of this kit and its heavily modified, and i cant simply just update it, can someone tell me how to do the FallDamage?
     
  46. Iron-Oxide

    Iron-Oxide

    Joined:
    Nov 20, 2013
    Posts:
    34
    Hello Stan,

    I am trying to add the NJG minimap but i dont have a weapon layer, do i just create one in layers?

    All i see is the attached:

    $screenshot.png
     
  47. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    Add the new layer to the project and assign it to the minimap prefab and General Settings -> Layer
    $mm.jpg
     
  48. ik_jolan

    ik_jolan

    Joined:
    Jul 26, 2013
    Posts:
    15
    Is there any easy way to sync objects over the network?

    spawed medic kits can't be viewed by others then the spawner
    flashlights neither

    could someone help?
     
  49. Stan-B

    Stan-B

    Joined:
    Aug 5, 2013
    Posts:
    126
    1. Create health game object and add photonview script to it
    $1.jpg $2.jpg
    2. Create prefab from it in Resources folder
    3. Update script RoomMultiplayerMenu.cs
    Add to declaration:
    public GameObject HealthBox;
    ...
    GameObject Health;

    Add Function:
    Code (csharp):
    1.  
    2.     void SpawnHealth()
    3.     {
    4.         if(PhotonNetwork.isMasterClient)
    5.         {
    6.         if(Health)
    7.             PhotonNetwork.Destroy(Health);
    8.  
    9.             for (var i = 0; i < allSpawnPoints.Count; i++)
    10.             {
    11.                 Health = PhotonNetwork.Instantiate(HealthBox.name, allSpawnPoints[i].position, allSpawnPoints[i].rotation, 0); 
    12.             }
    13.         }
    14.     }
    15.  
    4. Add call to the new function from the last line of awake:

    SpawnHealth();

    PS I used player spawn points for this sample - you'll need to crate separated set of spawn points for health and update function.
    $3.jpg
     
    Last edited: Mar 5, 2014
  50. ik_jolan

    ik_jolan

    Joined:
    Jul 26, 2013
    Posts:
    15
    thanks, but I do not spawn de health boxes in the beginning
    every player can drop 3 medic kits by pressing X
    there are no spawnpoints know