Search Unity

Realistic FPS Prefab [RELEASED]

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

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    I think it may work with Unity 2018 without modification. It works with 2017. If you're comfortable with scripting, you can get it to work with 2019. Otherwise, version 2.2 of Opsive's character controllers are coming out in the near future with some nice features such as being able to drive vehicles.
     
  2. Foodstamp

    Foodstamp

    Joined:
    Jun 11, 2013
    Posts:
    27
    Do you know what version of 2017? I tried with 2017.4.30f1 and 2017.3.1f1 and it gets weird on me with errors
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    What errors?
     
  4. Foodstamp

    Foodstamp

    Joined:
    Jun 11, 2013
    Posts:
    27
    I got it figured out, I was trying to mess around with the demo scene but realized I had to start a new scene

    Thank you for the help
     
  5. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    43
    Anyone find a way for weapons to use the same/share ammo?
     
  6. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    949
    Does anyone have the integration for Rucksack or inventory pro ?
     
  7. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    24
    My if statement always executes "else" when my boolean is false and I have no idea why.
    Code (CSharp):
    1. public bool doublepoints;
    2.  
    3. void Awake () {
    4. doublepoints = false;
    5. }
    6.  
    7. public void "Not Important"( int goes here ){
    8.         if (doublepoints = false) {
    9.             if ("Not important") {
    10.                 Debug.Log ("At max cash, can't add " + int goes here);
    11.             } else {
    12.                 Debug.Log ("Double points isn't active");
    13.             }
    14.         } else {
    15.             if ("Not important") {
    16.                 Debug.Log ("At max cash, can't add " + int goes here);
    17.             } else {
    18.                 Debug.Log ("Double points is active");
    19.             }
    20.     }
    21. }
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    @Bioman75 - Change this:
    Code (csharp):
    1. if (doublepoints = false) {
    to this:
    Code (csharp):
    1. if (doublepoints == false) {
    A double equals sign (==) tests for equality. A single equals sign (=) assigns false to doublepoints.

    Also, check these:
    Code (csharp):
    1. if ("Not important") {
    It's probably not doing what you want it to do.
     
    Bioman75 likes this.
  9. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    24
    Thank you yet again TonyLi, I cant believe I made such a simple mistake:eek:. Regarding the "Not Important" bit that was code I removed for the purpose of posting this because it wasn't important:D. Cheers
     
    TonyLi likes this.
  10. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    166
    I want to increase a NPC's ragdoll death effect from some weapons. But when i increase "Force" value on weapon, it doesnt affect alive NPCs. Just affects non NPC physics objects and NPC ragdolls.
    I want to make it in a way that when i hit a NPC with a cannon like weapon(non explosive) it would fly few meters.

    Any idea about what do i must change to achieve such effect?
     
  11. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    949
    @TonyLi Big thanks to Tony! This man is a Unity legend when it comes to his assets and not his assets, support! Love Dialogue Managers and Quest Machine! Keep up all of the integrations you do Tony. That is the reason why so many think highly of you!
     
    TonyLi likes this.
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    Glad I could help!
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    It will require a little scripting. It looks like you can set the NPC's CharacterDamage.ragdollActive bool to true and then apply force. To turn off ragdoll again, just set ragdollActive to false.
     
    A0101A likes this.
  14. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    166
    Hmm, If we scrap "some weapons" part of the question, then it will be an easier task.
    Thanks!
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    You could modify WeaponBehavior to apply the same force value to NPCs. If you don't want a weapon to apply rigidbody force to an NPC, just set its force to 0.
     
  16. amansweb

    amansweb

    Joined:
    Dec 20, 2017
    Posts:
    4
    Is there a way to store health packs like grenades and use it with another key bind? (like "G" is for grenade).
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    Nothing built in. If you happen to have a license for S-Inventory (also deprecated) and the Dialogue System, you can use the Dialogue System's integration to turn health packs into items that you can store in your inventory.

    Otherwise you'll need to replace the health packs' HealthPickup script with a custom script that stores health packs instead of using them right away. And then add another script that listens for the key bind to use one of the stored health packs.
     
    SickaGamer likes this.
  18. amansweb

    amansweb

    Joined:
    Dec 20, 2017
    Posts:
    4
    Thanks a lot.
     
  19. A0101A

    A0101A

    Joined:
    Aug 9, 2013
    Posts:
    194
    Hello, the RFPS movement members, anyone seen any Unity 2020 (beta) download link yet, so we can test if the prefab management is still unfriendly since they left 2017 version ?
     

    Attached Files:

  20. A0101A

    A0101A

    Joined:
    Aug 9, 2013
    Posts:
    194

    The best (currently) is to stay with Unity 2017.4.7, for the best and easiest work and results. The new versions of Unity, past 2017 introduce the unfriendly prefab "management" which makes the prefabs work impossible and loss of our dev work hours astronomic (attention unity team here, you should know better than this, calling it "prefab management" since 2017 - it's not it - and it has to go to direct prefab management how it was up to 2017, and is what community needs back, thanks).
     

    Attached Files:

  21. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    949
    RFPS works fine for me in 2019.3
     
  22. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    949
    Does anyone know how to make the arrow explode on impact? Is this something that can be done natively in RFPS or by adding in via scripting?
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    Way, way back, I posted some instructions for exploding arrows here. I have no idea if the exact steps work with the latest version of RFPS. If not, it shouldn't take much to adjust.
     
  24. twangydave

    twangydave

    Joined:
    Mar 30, 2017
    Posts:
    37
    Hi Tony,

    I hope you're well and you don't mind me asking a quick question about your save system as you are active in the thread.

    I'm using your excellent RFPS Save System and also the 3rd party integration for Tactical Shooter AI. Everything is functioning great and working smooth. The save system is correctly placing dead bodies for the enemies that have already been killed by the player, which is a great touch for realism.

    My question is about how to control the length of time these bodies remain in the level. I'm controlling this for the usual generated bodies through the Tactical Shooter AI base script but this does not seem to be applying to the dead bodies generated by the save script. These bodies seem to remain in the level forever. Is there a way to set a timescale for their removal through the TacticalAISaver script?

    Cheers!
     
  25. danteswap

    danteswap

    Joined:
    Oct 27, 2013
    Posts:
    138
    Wow Tony Its Great to see You Active , I will Be needing Ton Of Help From You But after some time , So Please be active , And Thanks For The Awesome Asset Currently Using In My Project In Unity 2019.3 And Everything Works Fine . :)
     
    TonyLi likes this.
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,234
    Hi @twangydave - Thanks for using the Save System! Add an RFPS RemoveBody script to the dead body prefab.

    Alternatively, add a TimedEvent component to the dead body prefab. Set the Duration (in seconds) that it should stay in the scene before disappearing. Then configure the OnTimedReached() event to deactivate the GameObject.
     
    Bioman75 likes this.
  27. twangydave

    twangydave

    Joined:
    Mar 30, 2017
    Posts:
    37
    Grand! Thanks for that Tony - very much appreciated.
     
    TonyLi likes this.
unityunity