Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Azuline-Studios, Apr 5, 2013.

  1. amirhijab0

    amirhijab0

    Joined:
    Nov 11, 2018
    Posts:
    1
    Hi I Use Rfps v1.23
    When Good Soldiers Kill enemies Or I Give Them A Position To Go They Don't Shoot And I Can't Move Them.
    There are 2 Errors In Console That Say "
    NullReferenceException: Object reference not set to an instance of an object

    AI+<AttackTarget>c__Iterator3.MoveNext () (at Assets/RFPSP/Scripts/AI/AI.cs:878)

    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
    "
    &
    "
    In order to call GetTransformInfoExpectUpToDate, RendererUpdateManager.UpdateAll must be called first.
    "
    I Hope You Can Help Me.
    Thanks Alot.
    I'm Sorry For My Bad English.
     
  2. FatimaPro

    FatimaPro

    Joined:
    Jul 9, 2018
    Posts:
    3
    Hi
    I did the same but i am still getting the version of 1.43. Also I am getting "Realistic FPS Prefab 143" pdf document in it. Can you please confirm that is the latest version also having the same pdf file or is it having with another name?
    Thanks in Advance
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    I just tested a refresh re-download in Unity 2017.3.1, and it correctly imported version 1.45. Azuline submitted RFPSP in Unity 5.2.5 and 2017.3.1. Maybe version 1.45 was only submitted for 2017.3.1+.
     
  4. HamzaMushtaq

    HamzaMushtaq

    Joined:
    Sep 24, 2017
    Posts:
    1
    Hello Everyone Can anyone tell me how to use RFPSP Kit For VR
     
  5. NickNovell

    NickNovell

    Joined:
    Apr 27, 2017
    Posts:
    51
    Hello. Can you please tell me where can I add this "QueryTriggerInteraction.Ignore"?
    I want the bullets to ignore the trigger objects except the water.
    Thank you.
     
  6. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    196
    Hi,

    I have also integrated TSAI with RFPSP and use custom character Enemies with TSAI having swapped out the TSAI default soldier model and set up some of my own settings for how they behave.. That works OK.

    As you have said TSAI integrates with RFPSP but is only designed for TSAI characters to integrate with the RFPSP Player character....

    I have attempted to get the TSAI characters to integrate fully with any and all RFSP.S characters - and vice versa but have not got that to work correctly as yet and given up a couple of times as it clearly needs some considerable intervention in perhaps both RFPS and TSAI coding. Had some success in getting TSAI characters to target RFPS characters (hit them - but not kill them) but not the other way around in any case.

    It had been the case that when attempting this quite a lot of code errors are returned which need attention which causes issues when running the test game and so I have given up a few times and stopped so as to not destroy my project. It really needs someone more knowledgeable than I to script the necessary stuff in a test level and not a real working project where damage could occur. I imagine its a fair job for an experienced programmer unless I am mistaken...

    I have as always thought about removing TSAI and using something else and also replacing RFPSP (which seems to be dead anyway) entirely but still cant find better alternatives for my own project.

    I may try again at some time when I can spare a lot of time and will let people here know if I ever get a solution. (unklikely)

    Peter

    :)
     
  7. Mario167100

    Mario167100

    Joined:
    Jul 25, 2016
    Posts:
    35
    I just wanted to know whether or not RFPS could work with Photon.
    (P.S i've asked this question multiple times but could never get an answer)
     
  8. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    449
    Is this still being supported by the developer?
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    Bluntly, no. Any framework that's as extensive as RFPS needs to be designed from the ground up for multiplayer. Otherwise you need to take it apart and put it back together with multiplayer in mind. If you have the technical knowledge to be able to write RFPS on your own but you're using it as a time-saving step, then you could make it work with Photon. If you don't yet have that degree of technical knowledge, then no.

    Your guess is as good as mine. @Azuline-Studios?
    All I can say is that the Save System for RFPS is still being supported.
     
  10. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    449
    I have repeatedly said this, without you TonyLi there would be no one posting help and support for this asset.
    You rock.
     
    ocimpean, jons190, lawsochi and 3 others like this.
  11. NickNovell

    NickNovell

    Joined:
    Apr 27, 2017
    Posts:
    51
    This asset could be the best on the assetstore if it had more support and updates. Even the climb animation is missing and no one did an update even for that! Anyway, TonyLi is the only supporter here. I have bought many other FPS assets but every time I return to RFPS :) I don't know why but I think this asset could go very high. Anyway, let's hope that @Azuline-Studios has something for us in the near future.
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    I'm glad to help when I can, but you only need to skim back through this thread to see that plenty other people help out with their RFPS experience, too. The whole Unity community is pretty darn amazing.
     
  13. NickNovell

    NickNovell

    Joined:
    Apr 27, 2017
    Posts:
    51
    Hello, is there a way to visualize the attack or listen or shoot range of the NPCs on the editor? Also I am still searching how to change the Player's (not the enemies) faction number with an on trigger event collider so I will be able to do hiding zones. If you have any other ideas on creating hiding zones, let me know.

    Also, for my previous question:
    Where can I add this "QueryTriggerInteraction.Ignore"?
    I want the bullets to ignore the trigger objects except the water.

    Thank you in advance.

    EDIT: I found the way to show attack, listen, shoot range with gizmos.
     
    Last edited: Nov 17, 2018
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    RFPS's AI script works directly with the player's transform. It doesn't use the player's faction. It does a Physics.RaycastAll using the AI's searchMask. It might work to temporarily change the player's layer to a layer that isn't in the searchMask.

    What about changing the trigger objects' layer to a layer that isn't in the weaponBehavior's bulletMask?
     
    NickNovell likes this.
  15. NickNovell

    NickNovell

    Joined:
    Apr 27, 2017
    Posts:
    51
    Thank you for your suggestions. Always helped me a lot!
     
  16. NickNovell

    NickNovell

    Joined:
    Apr 27, 2017
    Posts:
    51
    Hello @TonyLi.
    Changing the layer didn't work. Enemies can't damage me anymore but they still can see me and shoot me. Of course changing the layer gives me a good idea for cover :) Any other ideas? Thank you.
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    Okay, I checked the AI script. It does a Physics.RaycastAll to look for any objects that block the AI's view of the player. It doesn't actually look for the player directly. You could try creating an invisible collider around the player that the AI's Physics.RaycastAll would hit. Or you could temporarily change the factions of all of the AI instead. Or edit AI.cs and modify the CanSeeTarget() function.
     
    NickNovell likes this.
  18. NickNovell

    NickNovell

    Joined:
    Apr 27, 2017
    Posts:
    51
    Hello.
    I already tried all these solutions but they're not right for my game.
    Thank you for your answer, tho. I will leave the hide function for now.
     
  19. Mario167100

    Mario167100

    Joined:
    Jul 25, 2016
    Posts:
    35
    I have an annoying problem.
    I'm working with Lightning Box to help with Graphics, and my game looks a lot better with this asset pack. The annoying thing however are these annoying halos around some of my objects. Is there anyway to fix this?
     

    Attached Files:

  20. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    223
    Oh man. I have been using rfps in VR for about a year and half. Hit me up if you have questions. I'm using it for mobile VR. What platform are you on?
     
  21. yexumys750

    yexumys750

    Joined:
    Nov 25, 2018
    Posts:
    1
    How can I make a health sound in the halo style when I regenerate my health?
     
  22. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    I'm pretty sure it has something to do with the two cameras (Player and Weapon cameras). I haven't opened my unity project in a couple weeks due to work. But I'd suggest to start checking out if there's anything fighting over the directional light shafts. While the editor is playing you can alt-tab out and change the variables to see the changes live. Sorry I couldn't be more help.
     
    Last edited: Nov 26, 2018
  23. zevist

    zevist

    Joined:
    May 26, 2016
    Posts:
    5
    Hi,
    I am developing a melee game based on timing.
    I would like to parry only at the time of the right click then deactivated parrying for 1 or 2 seconds (currently the player can parry continuously). But I do not find how to do (probably in weapon behavior script). Can someone help me?
     
  24. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    Anyone else have a problem with AO flickering when moving the player?

    Standing still, the AO looks great but when moving it flickers and looks horrible. I've tried placing it on both cameras, but it still happens.
     
  25. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    558
    Is it AO or is it shadows, could be shadows if the near plane is set to low.
     
  26. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    558
    By parry do you mean carry? If you I think your asking about carrying pickups or objects, take a look on FPS player game object the drag object script.
     
  27. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    I think @zevist might be looking to change the way melee weapons go into defensive mode. Currently, the zoom input (e.g., right mouse button) continuously keeps the melee weapon in a defensive posture as long as you hold the input down. If you want to change this behavior, you'll need to modify the LateUpdate method in WeaponBehavior.cs. Start counting when the player hits the zoom input. After the specified duration (1-2 seconds), I think if you set FPSPlayer's blockState to false it should undo the defensive posture.
     
  28. zevist

    zevist

    Joined:
    May 26, 2016
    Posts:
    5
    Thank you, blockstate was the solution!
     
  29. F0GZ

    F0GZ

    Joined:
    Feb 22, 2018
    Posts:
    25
    Check out my new game trailer. FPS Player based on RFPSP.
     
    Oderus_Urungus, Al-, Mucossa and 2 others like this.
  30. Andres_Moreno

    Andres_Moreno

    Joined:
    Jun 28, 2016
    Posts:
    6
    Hello
    I'm coming to this thread to ask if somebody else have problems with the particle systems. Using the old particle system which is the one used by the RFPS particles seems to work fine, but wherever I try to spawn a particle using the newest system by Unity, the one that most of the Assets Store particles packages seems to use, it just never shows up on scene while using the RFPS player. In a new empty scene you can saw them as you should, but whenever is the player camera rendering the scene they are always invisible.

    Thanks for your answers.
     
  31. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    223
    Tony Li! What voodoo is this?

    So I am in the end of my current project and went to hook up the save system. I downloaded the latest version and noticed there have been some HUGE improvements/changes to the system. So my question is. What is the best practice around the new option to Not save on certain scenes on the auto save/load script??

    This seems like the exact functionality I need. (I only wanted to save on t e level intro scene and not the actual level. That way when a player quits the game, they will be taken to the intro level that has some admin scripts that have to run on startup, then off tot he beginning of the last played level.)

    I also seen an new "event system" that also looks like it has some functionality I need, but I am such a noob, i'm not even sure how to access and use the event system... Anyway... playing with it now and I'm sure I'll have some questions for ya....
     
    TonyLi likes this.
  32. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    223
    I too have had some issues with the new particle system. I had to change the emiters over to mobile, but couldn't on some of them for some reason. Had to clone and tweak the ones that I could and replace the ones I couldn't with.... Anyway, not sure that helps ya in any way....
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    Hi @jons190 - I'm glad you're liking the new features!

    I'm not sure which system you're referring to as "event system". There's a message system, but it's entirely optional. You may be interested in a set of UnityEvent components that are included with the Save System. Some useful ones are:
    • Trigger Event: Lets you use the inspector to hook up activity when certain GameObjects enter trigger colliders (e.g., activate a trap, play an animation, etc.)
    • Timed Event: Hook up activity to happen after a certain duration (e.g., 2 frames after the scene starts, or 10 seconds from now, etc.).
    • Disappear Event: Hook up activity to happen when a GameObject is deactivated or destroyed (e.g,. play sound effect or increment a score).
     
    jons190 likes this.
  34. NaumanH

    NaumanH

    Joined:
    Jul 10, 2012
    Posts:
    8
    Hello everyone,
    I am moving player on a path to create effect player is running from one point to other, I have disabled move control for player. FPS player is easily moved, FPS Camera moves too with FPS Player but SmoothMouseLook does not allow to rotate FPS Camera, if it is disabled it works fine, but on enabling FPS Camera jumps back to its last rotation, I want to keep its new rotation.
     
  35. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    I'm pretty sure it's the AO. Regular shadows it doesn't affect. Only when I add AO as a post processing effect does it happen.
     
  36. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    186
    ADDing Battleroyale mode?
     
  37. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    196
    Hi all,

    Destructible Objects and RFPS

    I am now working on adding more game dynamics to my game and have been trying to set destructible objects which I am stuck with doing. I am trying to get an object e.g. box/crate to be destroyed when hit by player bullet/projectiles and then instantiate/create/spawn as would be the case a separate prefab consisting of a box as separate parts to replace the original.

    1. Destroy Object : I have been trying to do this based upon RFPS interactive/destructible object scripts e.g. explosive object/breakable object which of course work in removing/destroying objects as they are designed to do, however I want to be able to make a copy of them (renamed) for use and then change the script - and in this first step I seem to be unable to do that as as If I change the script to another name (Class) the script will no longer function when attached to an object and it will not destroy it as it does with the default script. So I must be missing something else that I need do perhaps elsewhere within other RFPS scripts?

    I have also tried other scripts from around the web but they also refuse to destroy an object (simple box for example) when shot at by the player leave alone any other projectile which I want to be able to do later.

    2. Replacing Destroyed Object with another of constituent parts : Of course there's not much point in looking at setting up the second stage of instantiating the replacement object parts if I cant even get the object to destroy itself :)

    I guess someone else will have already have asked about doing this this or similar relating to destructible Objects in RFPS specifically and may know where I can find any info that may help me,

    If Tony Li, sees this perhaps he might be kind enough if the RFPS Save system may be able to help re perhaps:
    • Disappear Event: Hook up activity to happen when a GameObject is deactivated or destroyed (e.g,. play sound effect or increment a score).
    How might that help perhaps as I cant find a script in the Save System Folders for anything like that so how might that be set up? I guess it would be utilising a default Unity or other Event component? but how does that and would it integrate with RFPS.

    Seems that trying to do this is not something that is as simple or easy as Destroy Object/Instantiate Object in RFPS as perhaps might be the case if RFPS was using default Unity standards and components so for example going and buying an asset that is designed to manage destructible Objects might not work either unless it is compatible with RFPS? I don't know :)

    Does not seem like it should be Rocket Science :)

    Thanks again for any help, assistance or advice.

    Peter
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    Hi Peter,
    RFPS is hard-coded to look specifically for the DestructibleObject script. If you want it to work with RFPS weapons, you have to use this script, not a copy. Otherwise you'll need to manually edit the weapon behavior scripts to get them to recognize other destructible scripts, too.

    Yes, it integrates with RFPS. Make sure you're using the latest version of the Save System for RFPS, or at least a reasonably recent version. Then add a Disappear Event component to the destructible object. It has a UnityEvent that you can hook up in the inspector to do things like play sound effects. Make sure to play an Audio Source on a different object; if you play an Audio Source on the destroyed object, the sound will be cut off as soon as the object is destroyed. You can configure it to work when the GameObject is destroyed or just deactivated.
     
  39. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    196

    Hi TonyLi,

    Thanks for the information and feedback.....

    Tried that but it wont work....

    "You can configure it to work when the GameObject is destroyed or just deactivated."

    If I destroy a Crate (RFPS Breakable object script) by shooting it then as the Object - the crate has been destroyed so it presumably then cannot carry out the Dissapear Event which tells it to activate the alternate Crate pieces as the crate by then does not exist. This is the case if I set the choice in the Dissapear Event component to either destroy or even disable the create the result is the crate dissapears but the crate pieces (deactivated and waiting to be set active) fail to appear...

    As a separate test I have another box object in the level with a trigger attached to it with a trigger and a deactivate script on it so when the player activates the box trigger the crate does dissapear and the crate pieces then do appear so the theory works but not in the case of the crate and the Dissapear Event component managing it. Clearly I cant use an additional box and trigger added to the crate to do this as I want to be able to shoot the crate and cant even shoot a box with trigger as a trigger cannot register a bullet (projectile hit) to activate the trigger event and a trigger object cannot have a working rigid body either as far as I am aware as the trigger indicator cancels that and any hit registration out if I am correct :)

    I have attached a screen shot.
    Destructible Object.jpg
    Anyway thanks for your help I will have to keep looking for a best solution or any.

    Kind Regards

    Peter
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    It'll work. You just need to set up the crate with a particle system. For whatever reason, the Breakable Object script is written so that it only destroys the object after its particle system has no more particles. If the Breakable Object doesn't have a particle system, it will never destroy it. The easiest way to set it up is to copy the Particle System component from the Glass prefab. Then inspect the Particle System component's Renderer section, and assign the material "wood4" in place of "glassShards".

    For Explosive Objects, you don't need a particle system. But if you set Object Pool Index to anything other than zero, you have to set the Disappear Event to On Disable. If the Object Pool Index is zero (the default), it will automatically destroy itself.
     
  41. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,674
    Two quick questions. Does this asset work perfectly fine in 2018.2.xxx (any 2018.2 version). The second question does this asset now work with Easy Main Menu and it's pausing functionality? It was broken in the past.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    I haven't had any problems in 2018.2, but I've only tested Save System for RFPS functionality.

    @walledcityinfotech is probably the best one to answer about Easy Main Menu.
     
  43. walledcityinfotech

    walledcityinfotech

    Joined:
    Oct 10, 2016
    Posts:
    715
    Hi, emm has been working fine on all the versions of unity (please don't use any beta version as they are filled with bugs).
    Regarding pausing issue, I don't get it. Which issue are you addressing? I did made a video where I showed how to use rfps, emm and save system for rfps together. Please, if you haven't, follow that video for clear understanding of how to set up these 3 together. :)

     
    JamesArndt likes this.
  44. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    196
    DESTRUCTIBLE OBJECT UPDATE

    Hi TonyLi,

    "the Breakable Object script is written so that it only destroys the object after its particle system has no more particles."

    Thanks very much for that which makes sense now.

    Following your info I have now found what seems to be a simpler way to do what is needed in my case at least, which should I am sure work for both breakable and explosive objects if needed so this is what I have done in event that it may be useful for anyone else needing to do this....

    I simply edited the RFPS breakable object script to expose a public Create Object field parameter for the breakable object component so we can choose a prefab to instantiate after the original object is destroyed. Then following your info above I moved my instantiate object line of code I added to the very last line of the breakable object script so it is the last thing called by the script - walla it works perfectly :) Very simple way to do this I think and thus one can apply it to any suitable object(s). Of course one can add if need be a script to the prefab of the broken objects pieces left behind to destroy them after a specified time in seconds or whatever which I will do in my case. Job done. Thank you for your help.

    I attach a screen shot of the updated breakable object script component in place in editor so you can see how simple it is. Hopefully I wont have any probs with this down the line but all looks good :)

    Thanks again. Destructible Object Good.jpg

    Peter
     
  45. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    196
    Hi Again,

    Inside RFPS folders - Scripts/Objects/Destructibles there is a script called TurretExplosion.cs

    Anyone know what that is intended to work with and designed to do. I don't see any Turret object that comes with RFPS so was wondering if anyone knows what it is doing there?

    Thanks

    Peter
     
  46. Dumad123

    Dumad123

    Joined:
    Aug 22, 2013
    Posts:
    15
    What is the best way to modify the AI so that they continue to shoot the players last location whenever they hide? Currently, the way the ranged AI works is that if the player takes cover behind a wall, the AI come rushing to view of the player and shoot from there.
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    9,763
    Are you sure that's an RFPS script? Maybe it's a custom script that you added there. I don't see that script in my copy of RFPS.

    You'll need to modify the behavior of the coroutines in AI.cs. Or consider using a replacement AI asset such as Behavior Designer or Tactical Shooter AI.
     
  48. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    196
    Hi TonyLi,

    "Are you sure that's an RFPS script? Maybe it's a custom script that you added there. I don't see that script in my copy of RFPS."

    You may well be correct. I may well have placed it there myself and forgotten over time. I have quite a few custom scripts and others that I have sometimes placed in various folders thinking it was an appropriate location - as its an explosion script I may have placed it in the RFPS Destructibles scripts folder :)

    Reason I came across it was I am now moving on to game objects of various kinds (Turrets and vehicles and so on) that can shoot at other similar game objects as well as target Characters of differing types, e.g. Player, civilian, friend enemy and vice versa so that any type of AI object can target any other type of AI object. i.e. so the game can contain scenarios or battles between Characters and non character AI objects....

    Sounds like a tall order but I am going to have a go and get on with it. Its one of the last things I need get a handle on before I can start to put the game together proper.

    Peter

    :)
     
  49. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,674
    Awesome. Obviously, I've been out of the loop for a little bit. Easy Main Menu didn't work with RFPS when I would attempt to pause, as RFPS had it's own pausing functionality and I think this caused a conflict. This was the issue I was having back in March of this year.

     
  50. Dumad123

    Dumad123

    Joined:
    Aug 22, 2013
    Posts:
    15

    I have been looking in the AI.cs kinda confused where to start. my understanding is that there are bools saying its attacking a target and also checking line of sight? where should i look to modify?

    Thanks