Search Unity

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Deleted User, Apr 5, 2013.

  1. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    Yes but i cant think of it off the top of my head. Dont have RFPS in the project im working on at the moment
     
  2. Deleted User

    Deleted User

    Guest

    Thanks, Takahama. In version 1.2, the enemies can actually hear gunshots from behind the house or if they can's see you. In the AI.cs script, their search radius is expanded, but since improved pathfinding for the AI hasn't been implemented yet, they won't find a path around the obstacle to check the source of the weapon fire. This will be added in a future version when better AI pathfinding is implemented.


    Hi shaunmckay12, it looks like the issue is with the statements where you are trying to activate and deactivate the player or weapon object of the prefab, depending on your mobile and pause vars. First of all, do you want to deactivate/activate only the FPS Weapons object, only the FPS Player object, or both? This is actually something we're going to be testing soon to make prefab object activation and deactivation easier from our scripts.

    The errors are related to how the script is trying to locate the prefab objects. A better way to do this might be to access the public playerObj and weaponObj vars of CameraKick.cs, like this:

    Code (CSharp):
    1. static var canLock : boolean = true;
    2. static var mobile;
    3. static var unPaused : boolean = false;
    4.  
    5. static var weaponObj : GameObject;
    6. static var playerObj : GameObject;
    7.  
    8. function Awake () {
    9.     #if UNITY_IPHONE
    10.     mobile = true;
    11.     #elif UNITY_ANDROID
    12.     mobile = true;
    13.     #else
    14.     mobile = false;
    15.     #endif
    16. }
    17. function Start(){
    18.     weaponObj = Camera.main.transform.GetComponent("CameraKick").weaponObj;
    19.     playerObj = Camera.main.transform.GetComponent("CameraKick").playerObj;
    20.  
    21.     if(!mobile){
    22.         SetPause(true);
    23.         canLock = true;
    24.      
    25.         weaponObj.SetActive = false;
    26.         //and / or?
    27.         playerObj.SetActive = false;
    28.      
    29.     } else {
    30.         SetPause(false);
    31.         canLock=false;
    32.         weaponObj.SetActive = true;
    33.         //and / or?
    34.         playerObj.SetActive = true;
    35.     }
    36. }
    37. function OnApplicationQuit(){
    38.     Time.timeScale = 1;
    39. }
    40. static function SetPause(pause : boolean){
    41.     var player = GameObject.FindWithTag("Player");
    42.     if(mobile){
    43.         return;
    44.     }
    45.     InputDB.ResetInputAxes();
    46.     if (pause)
    47.     {
    48.         weaponObj.SetActive = false;
    49.         //and / or?
    50.         playerObj.SetActive = false;
    51.         //Screen.lockCursor = false;
    52.         Time.timeScale = 0;
    53.         player.BroadcastMessage("Freeze", SendMessageOptions.DontRequireReceiver);
    54.     }
    55.     else
    56.     {
    57.         unPaused = true;
    58.         Time.timeScale = 1;
    59.         Screen.lockCursor = true;
    60.         weaponObj.SetActive = true;
    61.         //and / or?
    62.         playerObj.SetActive = true;
    63.         player.BroadcastMessage("UnFreeze", SendMessageOptions.DontRequireReceiver);
    64.     }
    65. }
    66. static function HardUnlock() {
    67.     canLock = false;
    68.     Screen.lockCursor = false;
    69. }
    70. static function HardLock() {
    71.     canLock = false;
    72.     Screen.lockCursor = true;
    73. }
    74. private var wasLocked = false;
    75. function Update(){
    76.     if(!canLock)
    77.         return;
    78.    
    79.     if (Input.GetMouseButton(0) && Screen.lockCursor == false){
    80.         SetPause(false);
    81.     }
    82.    
    83.     if (InputDB.GetButton("Escape")){
    84.         SetPause(true);
    85.     }
    86.     // Did we lose cursor locking?
    87.     // eg. because the user pressed escape
    88.     // or because he switched to another application
    89.     // or because some script set Screen.lockCursor = false;
    90.     if(!Screen.lockCursor && wasLocked){
    91.         wasLocked = false;
    92.         SetPause(true);
    93.     }
    94.     // Did we gain cursor locking?
    95.     else if(Screen.lockCursor && !wasLocked){
    96.         wasLocked = true;
    97.         SetPause(false);
    98.     }
    99. }
    100. function LateUpdate (){
    101.     unPaused = false;
    102. }
    Not sure if that's what you were trying to do, but it at least resolves the syntax errors and lets you access the FPS Player and FPS Weapon object by script. If you still have any questions about this, please let us know.


    A cover system for third person would be possible, anueves1, but the initial implementation of our third person mode will probably be just an external camera view of the character without many changes to gameplay. A cover system is possible for a future update, though. We also are planning to implement a multiplayer mode in a future version once we've completed a few more gameplay additions, since it is one of the most requested features. It is also possible to implement multiplayer in the current version of the project if you are familiar with the workings of your network system. Hope that answers your questions.


    Hi Defcon44, good job on getting the objective waypoints working. The issue you describe with the objects becoming misaligned is likely due to the WorldRecenter.cs script, which moves all game objects in the scene, including the player, back to the scene origin coordinates (0, 0, 0) if the player travels past the threshold distance set by the script. This is done to prevent floating point precision loss the further the player moves from the origin.

    The recentering of all the scene objects is usually not very noticeable, unless the scene has close to the maximum limit of colliders, or some objects are not being moved along with the others, causing the misalignment. Do you know which layer the misaligned ladder object is set to? Please check that is is set to layer 10, the world collision layer. If it is already set to that layer, could you please provide some more information about that object, such as if it has it's static box checked, if there are any LOD components attached to the object, or any other components that might be causing the WorldRecenter.cs script to skip that object? You also might want to check that you are using the most recent version of Unity, as in a previous version, some objects were not translated by the script as intended. Thanks for you patience.


    Sure Kuwmii, in Ironsights.cs there is this code:

    Code (CSharp):
    1.              idleX = Mathf.Sin(Time.time * 1.25f) / 800.0f;
    2.              idleY = Mathf.Sin(Time.time * 1.5f) / 800.0f;
    You can try decreasing the 800.0f numbers to increase the idle sway, or increase the numbers to reduce the idle sway. If that's what you were asking. We will make this an editable variable from the inspector in a future version. Thanks for your feedback.


    Version 1.2 of the Realistic FPS Prefab has been uploaded and should be available for download from the Asset Store once it has been reviewed by the Asset Store team. This can take a few days, depending on how many assets are waiting to be reviewed. Here is a final list of changes for version 1.2:

    • Changed deltaTime check in WeaponBehavior.cs to prevent null reference error if starting scene with a weapon selected using the firstWeapon var of PlayerWeapons.cs.
    • Added showNegativeHP var to HealthText.cs to allow option for preventing display of negative HP.
    • DamageZone.cs script can now be added to a trigger to damage the player over time when they enter the trigger area.
    • Prevented the optional sound effect for catching breath after sprinting from playing multiple times instead of only once.
    • Added limitStrafeSpeed var to FPSRigidBodyWalker.cs to allow fine-tuning of diagonal strafe speed.
    • The burstFire and burstAndAuto vars of WeaponBehavior.cs can now allow guns to use a 3 round burst fire mode. If burstAndAuto and fireModeSelectable is true, all three fire modes will be cycled for that weapon (like an MP5). If semiAuto, fireModeSelectable, and burstFire are true, weapon will cycle between burst and semi auto modes (like the M16A2). If only semiAuto and fireModeSelectable is checked, weapon will cycle between semiAuto and Auto (like an AK47).
    • burstShots of WeaponBehavior.cs can be used to set the number of shots per burst.
    • Added walkAnimSpeed and runAnimSpeed to AI.cs to control playback speed of NPC movement animations.
    • shotDuration of AI.cs can now be used to control the delay between NPC attacks, with some randomness (delayShootTime is used to control time that shot/melee attack is fired after NPC starts attack or raises weapon).
    • shootAnimSpeed of AI.cs now sets the playback speed of the firing animation. A value of 0.5 means animation plays half as fast. This is mostly to allow NPCs to raise their weapons for a longer time when using burst fire weapons like the soldier NPC.
    • Fixed timing of weapon sprint animation and position cancel when player is falling.
    • Added fadeTexture var to PainFade.cs to allow textures to be displayed on screen for player damage feedback.
    • Added liquidMask layer mask to WeaponBehavior.cs to allow submerged objects to be hit when firing from above water surface.
    • Updated FPSPlayer.cs rayMask to include layer 19, the interactiveObjs layer, so items can't be picked up from behind glass.
    • Added small delay to WorldRecenter.cs to prevent camera lerp misalignment during a world recenter.
    • Made the forward capsule cast check for player movement take the player's capsule collider height into account so low spaces like vents can be traveled into.
    • Created InputControl.cs script which handles all input calls for the asset and reads bindings from Unity’s Input Manager.
    • Cleaned up jumping code to detect button press instead of button hold, which allows better detection and jumping over frontal obstacles player might be walking or running into.
    • Moved most GetComponent calls into initialization code (for optimization).
    • Updated GUIText scripts to only update parameters if information to display has changed (for optimization).
    • Shortened length of folder names to reduce chance of access errors if path to assets was too long.
    • Made the slope check in FPSRigidBodyWalker.cs better detect uphill or downhill slopes.
    • Added a check in DragRigidBody.cs to raise weapon if dragged object is destroyed while dragging.
    • Added inputSmoothSpeed var to FPSRigidBodyWalker.cs to allow customization of input smoothing speed.
    • Updated landing and footstep sound effect code to prevent null refs if no sounds are defined.
    • Added sprintStrafeRoll and walkStrafeRoll vars to Ironsights.cs to control camera roll when strafing.
    • Modified FPSRigidBodyWalker.cs to allow player to better change crouch states with positive and negative playerHeightMod values.
    • Added fallDamageMultiplier var to FPSRigidBodyWalker.cs to control amount of falling damage taken as a product of units fallen times this value.
    • Added healthToRestore vars to DrinkPickup.cs and FoodPickup.cs to allow food and drink pickups to also restore player health in addition to thirst and hunger.
    • Improved the capsule collision check in FPSRigidBodyWalker.cs to prevent player from getting stuck in small, concave spaces.
    • Added a CameraJump animation to the Main Camera object which the FPSRigidBodyWalker.cs script plays at the beginning of a jump for a better sense of player weight.
    • Added silentShots var to WeaponBehavior.cs and listenRange var to AI.cs to allow silent weapons and NPC detection of weapon fire.
    • Prevented ejected shells from inheriting weapon angles and velocity if player is prone and moving to avoid unrealistic movements of shells.
    • fireSndRandPitch var of NPCAttack.cs can now be used to define lower range of random pitch for attack sounds (pitch will be between this value and 1).
    • allowProne and allowLeaning vars of FPSRigidBodyWalker.cs will define if the player can go prone or lean.
    • proneCamHeight var of FPSRigidBodyWalker.cs will define the height of the camera when the player is prone.
    • Soldier NPC added which drops an M4 weapon pickup when killed.
    • Knife and M4 weapons and pickup items added.
    • Fixed barrel smoke particle effect which was not playing for all weapons.
    • Improved Physics.CheckCapsule and Physics.CapsuleCast position arguments in FPSRigidBodyWalker.cs to use less approximation and better compatibility with a wide range of playerHeightMod values.
    • Moved ammo and weapon type variables to the top of WeaponBehavior.cs for easier/faster accessibility from the inspector.
    • The bullet-time feature can now be toggled on and off by clicking the Allow Bullet Time box of the FPSPlayer.cs script component.
    • Help text display can now be toggled on and off by clicking the Show Help Text box of the FPSPlayer.cs script component.
    • Added fontScale variables to GUIText scripts to allow automatic scaling of text to screen height.

    And here is the demo for the current version of the asset:


    Also, is there anyone who still needs this project to be compatible with version 3.5 of Unity? We can probably do one or two more versions of the asset that supports Unity 3.5, but we are looking at moving to Unity 4.x in the next version if there isn't any need for version 3.5 compatibility. You can send us a PM, email, or post in this thread with your thoughts on this. Thanks!
     
    Last edited by a moderator: Jul 4, 2014
  3. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hi Azuline,
    NEW VERSION *_* so excited !!!! :D

    I go check for my player ;)

    ----------------------------------------------------------

    So, i have check for the worldRecenter.cs and i have augmented the " treeshold " for 100000 and is good,
    The prefab don't move for the other position :D

    Thacnk's Azuline !
     
  4. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    @Azuline Studios
    Very nice update but i have a feedback :l
    Please put the flare layer to main camera, not weapon camera. its makes flare effects not stable, i tryed to put it into main camera and its works very well.
     
  5. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    You dont need Azuline Studios to do this. all you have to do is go to the main camera, add component and put flare layer on it.
     
  6. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    Very nice updates in 1.2, i hope i can update soon.

    One question, i told you i was making a weather asset, showed you some screenies,
    i have a problem with my lens/sunflare and windows/glass, normally i can put my collider from my windows
    on the transparent FX layer cause its a simple mesh with transparent texture and then i see my sunflare
    through my glass, but since the glass in RFPSPrefab is a interactive object it needs to be on the
    InteractiveObjects layer to be able to destroy the glass and keep it's functionality.

    I tried to make a empty gameobject as a child of the glass/window and put the collider on that child
    to see if there was an easy way to get it to show my sunflare and still keep functionality, but that doesn't work.
    I know i could probably solve it if i took the time for it, but i'm quite busy with my weather asset, and i'm making a bunch of STALKER like buildings and also tons of high res grass/detail meshes so i thought why not ask it,
    cause maybe you guys know from the top of your head how to resolve it, would make my life a little easier.

    If not, not to worry, i'll find out eventually, but if you do have an idea, i'd appreciate it a lot.

    still enjoying your asset immensely, i will also make some very detailed textures for the guns in the near future,
    when they're done, i'll send them to you so you can use them in the prefab.
    I make the same quality textures as Millennia so i'm sure you'd appreciate them.
     
  7. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    i said i do that already =_="
    i write that for Unity beginners.
     
  8. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    Yes and i was saying he doesnt need to waste his time. Its so simple there is no need for him to do it.
     
  9. brolo123

    brolo123

    Joined:
    Dec 2, 2012
    Posts:
    7
    Thanks for the replay azuline, What i really meant for the player camera wobble, instead of just the weapon. Is that possible? I would like so that the player camera will wobble more or even the cross hair moving like the player is actually breathing. thanks
     
  10. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    hey guis how do i make an bolt action sniper with Realistic fps prefab? like an l96 and to not eject the shell when i shoot just then the animation( re chamber a bullet ) is played
     
  11. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    You can do this with a 3D program like 3DSMax or Maya or another 3D program, you'd have to import a fbx file (like the AK with scope sorta sniper) and replace the weapon for the bolt action rifle and retarget the hand animations.
    After that you can set it up just like the other weapons in the gameobject hierarchy and make a new player prefab from it.
     
  12. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    no im not refering to how do i make the model i allready have the model but how to i configure the scripts for it
    i don't want my sniper to be semiautomatic like the ak with scope in the demo
    just what i want is to make it spawn the bullet after the animation re chamber a new bullet from the mag

    like in my clip here
     
  13. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    Hey there, when can we expect Realistic FPS Prefab Version 1.21 on Unity Asset Store ?
    Thanks.
     
  14. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    I wasn't talking about modeling, i was talking about putting the gun into the RFPS hands and retarget the animation to the RFPS hands.

    I see you already have a good animation with even better hands then RFPS's hands, so you could just import this into the gameobject hierarchy, but then you would have these hands only when you equip your sniper and the RFPS hands when you equip another weapon.

    That's why i said you need to import the gun into a copy of the RFPS hands, you do this by duplicating one of the animated fbx guns and hands and replace the gun for your gun, and the retarget the hand animation and save it as a new sniper.fbx file and import that into Unity, and that is done in a 3D package.

    If you don't mind that you have different hands with each weapon you can just import this gun with animations onto the player weapons gamobject and attach the scripts to it and position it right, but in my opinion it would look silly if your arms are naked with a pistol and after changing weapon you also changed your clothes and have different hands all of a sudden, thats why you need to import the model onto the RFPS hands and retarget the animation, atleast i would..
     
  15. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    To have the shell to eject when you pull the bolt, try messing with the shell eject delay.
     
    MP-ul likes this.
  16. Salazar-Aguilar

    Salazar-Aguilar

    Joined:
    Feb 10, 2014
    Posts:
    21
    Export you model in fbx to unity, in Unity, select the fbx file, then go to the animation tab in the inspector window, add a new animation and call it "Fire" by taping the frist frame and the last frame of the animation, click apply. Add this new weapon model to the RFPS weapons list, make a new weapon or replace the model of one with your sniper model. Change the variables according to a sniper rifle, like more zoom, less DOF, less ammo like 5 bullets per magazine, more recoil, and check that the gun is just in semi, and have not the automatic fire option. Also change the shell eject delay option to spawn the shell when the hand rocks the bolt. I recommend delete the shell in the weapon model and export it in separate to make the shell prefab and have shells with physics and 3d sound. Also you gonna need and import a reloading animation and a unsheathe animation. Call this two animations "Reloading" and "Ready".
    Finally, if you want something like a fast fire effect (Like call of duty (shot shot shot shot shot, reload, shot shot shot shot shot)) select the automatic fire option and disable the semi fire option, and change the fire rate value to the length of your sniper animation in seconds. You can also change the speed of the shooting animation in the same inspector windown.
     
    Last edited: Jul 8, 2014
    MP-ul likes this.
  17. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Thanks for the documentation it help me a lot
     
  18. StanleyDrunk333

    StanleyDrunk333

    Joined:
    May 17, 2014
    Posts:
    6
    whereitsat1.21assetstore?
    Thatthere are1.19
     
  19. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Unity need a few day for check the update ;)
     
  20. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hi Azuline !

    i have one question about RFPS Prefab, you'r kit support Oculus Rift ?

    Thanck's :)
     
  21. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    1.21 is HERE !!!!!

    Thanck's Azu :)
     
  22. Deleted User

    Deleted User

    Guest

    No problem Takahama, we'll make this change to the flare layer. We haven't done much testing with light flares yet, so your feedback is appreciated.


    Yes, your weather asset looks great, Marcurios! Thanks for the offer to do some higher resolution weapon textures too. As far as the transparent FX issue with windows and light flares, you might want to try adding a check for layer 1, the transparent FX layer, in the ApplyDamage() checks around line 1048 of WeaponBehavior.cs like this:

    Code (CSharp):
    1.  
    2.      //call the ApplyDamage() function in the script of the object hit
    3.      switch(hit.collider.gameObject.layer){
    4.        case 1://hit object is an object with transparent effects like a window
    5.          if(hit.collider.gameObject.GetComponent<BreakableObject>()){
    6.            hit.collider.gameObject.GetComponent<BreakableObject>().ApplyDamage(damage);
    7.          }
    8.          break;
    9.        case 13://hit object is an NPC
    10.          //ect..
    11.  
    This should allow the weapon raycasts to call the ApplyDamage() function of an object set to the transparent FX layer that also has a collider and BreakableObject.cs script component attached. Hope that helps.


    Sure Kuwmii, the code for the idle vertical camera bob is located in the VerticalBob.cs script around line 123:

    Code (CSharp):
    1.  
    2.         if(!FPSWalkerComponent.swimming){
    3.            if(IronsightsComponent.cameraIdleBob){
    4.              idleYBob = Mathf.Sin(Time.time * 1.25f) * 0.015f;
    5.            }
    6.          }else{
    7.            if(IronsightsComponent.cameraSwimBob){
    8.              idleYBob = Mathf.Sin(Time.time * 1.65f) * 0.08f;//increase vertical bob when swimming
    9.            }
    10.          }
    11.  
    You can increase the 0.015f amount to make the vertical camera bob more noticeable. You can also add a check for the zoomed var of the FPSPlayer.cs script component here to increase the camera bob when zoomed. A new var called idleXBob can also be added with similar code to that which handles the idleYBob amounts, to have the camera bob horizontally.


    Hi Fenixake, KingofMk98 is right that you should experiment with the Shell Eject Delay amount of the WeaponBehavior.cs script component. If this value is zero, the shell will eject as soon as the weapon is fired, if the value is greater than zero, there will be a delay of that amount after firing before the shell is ejected, like for the shotgun in the demo scene. Marcurios and Salazar Aguilar also have some good tips on customizing the weapon behaviors and meshes, thanks guys!


    Sure Defcon44, there is a guide on our blog that covers adding basic Oculus Rift support, following the steps in the guide should allow the prefab to interface with the OVRCameraController object. This is a very basic implementation, so there might still be a few glitches, but with some experimentation, you should be able to get it working. If you have any specific questions about this, please let us know.


    Yes, version 1.21 has been reviewed and is available for download from the Asset Store. So please feel free to try out the new features, and as always, let us know if you have any observations or ideas :)
     
  23. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hi Azuline !

    This is a very great new version but .... I have lost my first level after importation :mad: (few month work's).

    I check other scene but nothing ... then i open my " level 1 " this is the demo scene will open ... but a glitch demo level (not terrain, material PINK) ...

    Thanck's
     
  24. Salazar-Aguilar

    Salazar-Aguilar

    Joined:
    Feb 10, 2014
    Posts:
    21
    Usually when something is pink in a videogame or any 3d environment, is because the object has lost his material, check in the inspector if the material is correct, in the nut tab
     
  25. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    Greetings, is there any way that I can update my prefab without overwriting all the custom code that I've applied to the scripts? I want to update but I fear that it will overwrite everything that I've done.

     
  26. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    @BioXide its good idea to make a backup every now and then ..and especially when you are upgrading any plugin, code or pretty much any other asset or Unity itself. Read couple post earlier what happened to @Defcon44

    Now when you have the backup, you can simply try and see what happens. Probably all modifications you have done, are overwritten. Actually, i think you should remove old version of RFPSP and only after that, import new version ..so obviously if you got something in that folder, it'll be gone.
     
  27. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Yes ! I know that !
    But this is not my level.

    Pretty good games guy !

    But how are you add a legs with animation ?


    Oh and i have a new probleme with the update, i don't have all animation for the solider :/
    And in game he don't attack me, in the console i have " error ..... AI.CS : GetRef " in red :s

    What is it ?


    Probleme resolve ;)
    I have importing again the " soldier " folder
    I have this bug because in my project i have the project " bootcamp "
     
    Last edited: Jul 12, 2014
  28. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    I attached the character model to the FPSPlayer and made the animations, then just code them in so whenever you press W the animation starts playing :p
     
  29. niraj

    niraj

    Joined:
    Feb 14, 2013
    Posts:
    56
    Hello, I just Grabbed your asset from asset store and need your little help. When i have opened the demo scene in the folder the keyborad inputs are not responding and giving errors like:

    ------------------------------------

    UnityException: Input Button Right is not setup.
    To change the input settings use: Edit -> Project Settings -> Input
    InputControl.Update () (at Assets/!RFPSP/Scripts/Player/InputControl.cs:140)

    ------------------------------------

    Please help me setting up those 4 input axes for making the Demo work.

    Thanks
     
  30. t0xic0m

    t0xic0m

    Joined:
    Jun 28, 2014
    Posts:
    12
    Hello,
    i download the new Version 1.21, now i have a problem with the Soldier Animation.
    I can´t open the Animation Files, the file format is *.*FBX7 and *:*FBX3
    fehler.jpg
     
  31. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    i have a same problem with this !
    If you are the " bootcamp " project you need to deleted ALL folders and files about soldiers.

    After then works :)
     
  32. dimmuo_legacy

    dimmuo_legacy

    Joined:
    Jul 14, 2014
    Posts:
    2
    Hello, i can use this prefab in a multiplayer game?
     
  33. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    Thanks Defcon44! You saved my entire project!
    (Removed Bootcamp assets)
     
    Defcon44 likes this.
  34. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Yes you can but you need to create a 3D Character ;)

    You Welcome :D
     
  35. dimmuo_legacy

    dimmuo_legacy

    Joined:
    Jul 14, 2014
    Posts:
    2

    Thanks!
    Yes, but I tried to put a character in the scene and did not work =/

    Question:
    Can I use the soldier enemy ( models and animations ) and turns it into player?
     
    Last edited: Jul 14, 2014
  36. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Yes i think but i don't know how can do that :s
     
    dimmuo_legacy likes this.
  37. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    just tried the new version, i think you forgot to include the Inputmanager.asset file.
    We need to setup our own input buttons now to make it work.

    left, right, q and e and forward and backward and all.

    i'd rather have your file then to redo all my inputs.

    i'll wait a bit with the new version, got some other things that i need to do first.

    i understand that it is a lot of work to finalize a asset, but maybe next time check the asset in a new project before you release it would be prudent to make sure it works out of the box, you know there are a lot of beginners that have difficulties ironing out minor errors.
     
  38. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    I don't have this problem after import of the new update :)
     
  39. Deleted User

    Deleted User

    Guest

    Hi Defcon44, Salazar Aguilar has the right idea. In version 1.21 the asset folder names were shortened to try to prevent access errors with long directory paths, this could be the issue. Sometimes it is a good idea to back up your current project when upgrading and to import the new version into a blank, empty project for testing. Sorry for the inconvenience.


    Very nice video BioXide, your project looks amazing! As far as updating your player prefab to the new version without overwriting custom code, you can try opening your version of the script and the new version in a program like WinMerge or Notepad++ with the Compare plugin to view the differences and manually update your scripts. This can be time consuming, but might help familiarize you with the scripts. I think MonoDevelop also has an option to generate DIFF files that might also be helpful. If you have any specific questions about this, please feel free to send us an email or PM.


    Hi niraj, the new version of our asset should include the InputManager.asset file which contains the button and axis assignments that the Realistic FPS Prefab is expecting to find in Unity's Input Manager, but sometimes this file can be overwritten by another asset or does not get imported, so here is a link to the InputManager.asset file that contains the current input settings. If another asset in your project did overwrite the InputManager.asset file, you might need to resolve this by combining the two InputManager.asset files into one, or renaming some of the input access names in the script to use the names of the buttons and axes expected by the other script. Hope this helps.


    Hi t0xic0m, you might to try Defcon44's idea of deleting the bootcamp asset from the project in case there is a conflict. As far as the .FBX7 and .FBX3 files, they can be deleted, as the only file used for the soldier NPC's idle animation is the Soldier@idle.FBX file. These files could have been generated during an export, or we forgot to delete them after testing. Sorry about that.


    There will need to be some modifications to the current version of the prefab if you want to use it in a multi-instanced networked environment, dimmuo. Some other forum posters have implemented network functionality using PUN, so you might want to give that a try until there is an official multiplayer mode for our project.

    For this feature, the position of an instance of the player character model (like the soldier model) needs to be synchronized with the player prefab position, either by script or object parenting, then the walking, and other animations need to be played when the player is moving forward, like BioXide described. We are working on this for a future version, so hopefully the wait won't be an inconvenience.


    Hi Marcurios, have you imported the Realistic FPS Prefab into a new, empty project? In our testing the InputManager.asset was imported along with the other assets and ran without errors, but the issue you described can be the result of another asset overwriting the InputManager.asset file used by our project, leading to the InputControl.cs errors you described. Also, since our asset is in the Complete Projects category of the Asset Store, the project settings files should be included and imported as part of the package.

    It's possible that the new version of the InputManager.asset was overwritten or there was an error importing it in your project, so you can download it here and try placing it into your Project Settings folder after backing up the existing InputManager.asset file. If another asset in your project is expecting its own settings to be listed in Unity's Input Manager, you can try opening both files in a text editor and combining the input assignments, or modifying one of the script's axis and button access names to read the name assignments of the other asset (all the input access calls in our project are now located in the InputControl.cs script). In a future version we will include the InputManager.asset file in the base folder of our project like we have done with the TagManager.asset file to help users debug their projects. Hope this helps and sorry for the confusion.
     
    Last edited by a moderator: Jul 16, 2014
  40. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    Yes i imported it in a empty project, i always do that so i can check it first and then make my own adjustments in it so it works like i want.

    Thanks for the file, i'll try it out.

    I know how to alter the inputs or scripts for that matter so i would get it to run anyway, but i am always busy with other things, thats why i asked first before correcting it.


    EDIT: ok, it works now, but leaning isn't working correctly when leaning without something(collider) in front of the player, player makes leaning animation, at the same time goes forward a step and starts strafing in the opposite direction that the player leans, all while the leaning animation is still active.
    All the controls from inputcontrols.cs are setup in the Inputmanager,so there must be something wrong with the Mytransform.position routine or something in that order.
    If i disable leaning, the player starts off falling from the sky and start running and strafing without pressing any key at all.

    i'll try to find the culprit.

    I also noticed in the script that you added Application.Quit(); on pressing escape, i added

    #if UNITY_EDITOR
    UnityEditor.EditorApplication.isPlaying = false;
    #endif

    underneath the Application.Quit(); to make it stop playing in the editor when pressing escape.
     
    Last edited: Jul 17, 2014
  41. Deleted User

    Deleted User

    Guest

    Ok, good job Marcurios and that's a nice code addition as well. What you mentioned about the leaning feature certainly does not seem to be intended behavior. Do you know if there are any errors in the console being displayed while this is happening? Also, to help us troubleshoot the issue, would you mind answering some questions, such as, do you have multiple gamepads or other input devices plugged in, what kind of gamepad (if any) you're using, and what OS you're running? The default InputManager.asset is set to detect an Xbox360 gamepad, but it might need to be reconfigured if another gamepad type is being used. Another thing you might want to try if you haven't already is to redownload the package from the Asset Store in case a file was corrupted during the transfer, as this has helped other users with similar issues. Please let us know if you are still experiencing this and thanks for your patience.
     
  42. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    Thanks, your suggestion to re-download and re-import the asset made it clear what is wrong here.

    I have a special PC for connecting to the Internet, for security reasons, i don't want my working PC to be exposed to the net, a few years ago i got a nasty virus that actually destroyed all my Data, my songs that i wrote (40 rocksong arrangements), and 1 year work on my 3dsmax projects that made me really sick.

    So because of that i download the asset with my Internet PC and make a Package from it and transfer that to my working machine, that is where things go wrong, cause i tested the asset first on my Internet PC now and it works ok there, exactly as it should be, but when i make a package from that it won't work on my working machine, so i decided to read up on making packages in the Unity Manual, but no matter what i do, it won't work.

    I tried it like 5 times now, ofcourse i select include dependencies with package export, i tried to just select the main directory 3 times, each time when i export i get a package from a different size, so unity's package export seems to be faulty, otherwise i can't understand why it would differ in size each time.
    I also tried to select all files within the main directory, and tried to select the scene and export that, nothing works.

    Or is there something i'm missing here, i googled for corrupt package export, and package missing things on export, read the manual and followed the instructions to the letter, but it won't export right.

    You know what it could be ?

    By the way, i have Windows 7on both PC's, no fancy controllers, just a mouse and a keyboard, no error messages with export and import to answer your earlier questions.

    EDIT: i copied the entire project folder to my working machine and it works OK like this, so there is something wrong with Unity's package export, it messes up the asset, that is a serious problem, cause now i cannot insert it into my game.

    I'm kinda hoping i'm doing something wrong and you guys can educate me, that would make me a happy soab.
     
    Last edited: Jul 19, 2014
  43. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    Marcurios likes this.
  44. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Hi.
    I am currently building a multiplayer game and using this asset. First off you guys did an amazing job with realistic fps prefab. Best thing you can buy for an FPS Game and MORE!
    I just have one problem.
    When i start my multiplayer game up and spawn into the game i keep getting an error everytime i try to pick up objects. Weapons, ammo, Health, etc
    It will not allow me to pick up the object and it comes up with this error

    NullReferenceException
    UnityEngine.GameObject.GetComponent[FPSPlayer] () (at C:/BuildAgent/work/d3d49558e4d408f4/artifacts/EditorGenerated/UnityEngineGameObject.cs:28)
    HealthPickup.PickUpItem () (at Assets/!Realistic FPS Prefab Files/Scripts/Items/HealthPickup.cs:25)
    UnityEngine.Component:SendMessageUpwards(String, SendMessageOptions)
    FPSPlayer:FixedUpdate() (at Assets/!Realistic FPS Prefab Files/Scripts/Player/FPSPlayer.cs:512)

    I could really use some help with this problem any support would be greatly appreciated

    Thank you
     
  45. BioXide

    BioXide

    Joined:
    Jul 9, 2013
    Posts:
    21
    Greetings!

    I'm wondering if there's a way to edit the current NPCs to allow them to use Navmesh and avoid obstacles, if not, when can we expect the AI's supporting navmesh? I'm currently trying to push out a pre-alpha version of my game but I'm stuck on choosing which AI system to use, I'm currently using the Shooter AI prefab but it's too buggy and unreliable, I love the AI that comes with the RFPS pack, since it's spot on but you can exploit the AI by standing behind a collider and shooting them, since they don't use navmesh.
     
  46. Marcurios

    Marcurios

    Joined:
    Nov 19, 2012
    Posts:
    88
    chelnok likes this.
  47. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Hi every body !
    Wath's up ?
    I have a big problem with my particleEmitter see:

    I want deactivated my rain ParticleEmitter after enter in the trigger and re activate after exit this trigger.

    I have this script :

    Code (JavaScript):
    1. #pragma strict
    2.  
    3.  
    4. var particle : ParticleEmitter;
    5.  
    6. function OnTriggerEnter(other : Collider){
    7.       gameObject.particleEmitter.emit = false;
    8. }
    9. function OnTriggerExit(other : Collider){
    10.       gameObject.particleEmitter.emit = true;
    11. }
    If i add this script on my particle emitter, after enter in the trigger the script doesn't work :(
    And if i add this script on my player with my particleEmitter inside my game Freeze :mad:

    How i can activate / deactivate my rain particleEmitter ?

    Thanck's
     
  48. KingofMk98

    KingofMk98

    Joined:
    Oct 10, 2013
    Posts:
    63
    Do you have a collider set as the trigger? because when i add a collider to the my rain particle emitter it works perfectly
     
    Last edited: Jul 21, 2014
  49. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Hi, does this have a interaction system as well for doors and platforms, etc? What sets this apartment from UFPS? I am trying to decide between the two and I would love some help on making that decision by hearing anyones opinions who has tried both.
     
  50. Defcon44

    Defcon44

    Joined:
    Aug 19, 2013
    Posts:
    400
    Yes he as on trigger :)