Search Unity

Realistic FPS Prefab [RELEASED]

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

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Sorry, I still don't quite understand. Digging into Azuline's source, here's what happens:

    1. When you hit glass and it doesn't break, it gets empty GameObjects named glassMark#(Clone). Each of these has a child GameObject with a FadeOutDecals component.

    2. When you break the glass, it finds all children with FadeOutDecals components and deactivates them.

    If you hit the metal of the car, this will probably add empty GameObjects named BulletMark#(Clone) to the car (assuming that's what you've configured it to have). It's possible that these bullet marks are spread far enough that some of them overlap where the glass is. In this case, they'd stick around because they're children of the car, not the glass.

    I don't know if that will be helpful or not, but that's all I can think to offer. Good luck!
     
  2. Michael2D

    Michael2D

    Joined:
    Mar 5, 2014
    Posts:
    17
    Hi.
    Anyone got RCC working for new RFPSP version???
    I tried to use script here on this forum from "Jimbo" And its not working anymore... Any help? or how to make the Main FPSPlayer - gameobject not dissapear because its dissapearing and separating FPS effects, camera. etc..
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Sorry, I haven't used RCC. But to prevent the FPS Main GameObject from disappearing, inspect FPS Player and untick Remove Prefab Root. If you do this, you should try to limit your scenes to 10 kilometers, or 10,000 units, to prevent jittering from floating point accuracy.
     
    Michael2D likes this.
  4. ronie635

    ronie635

    Joined:
    Nov 22, 2016
    Posts:
    17
    Thanks again for putting time into this! I will check where the clones get created in the hierarchy and double-check all the layers and tags.
     
  5. ronie635

    ronie635

    Joined:
    Nov 22, 2016
    Posts:
    17
    Here's what's strange, the decals get parented wrong, all the way back to the car-gameobject. There's two "indentations" from the parent: to "meshes", to "door holder" which has the window as a child-object. Can I change *somehting* in the script that makes this parenting work as intended?
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    It really sounds like it's hitting the car's collider and not the glass's collider. I suppose you could hack it by fiddling with the code around line 320-something in WeaponEffects.cs. But the best next step might be to add Debug.Log around line 323, something like:
    Code (csharp):
    1. Debug.Log("Hit " + hit.collider + " with tag " + hit.collider.tag + ". Adding decal with ID " + markObjID);
    Make sure it's reporting the glass and not the car.
     
  7. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Clones,

    I am having issues with clones too. That's whats seemingly stopping my new Player Character working correctly and giving me the killer FP (Visible) body display in Third person mode so I have two Player bodies :)

    Whats with the Clone thing is that just an RFPS thing or is it a typical Unity thing and why is it needed?

    Whatever I cant have two bodies showing or a Soldier character in a Fantasy game so I must get a new Player character into my game projects one way or another.

    RFPS is seriously in need of a decent and reasonable solution to replacing the Player character model (Third Person Mode) and for that matter adding new weapons as it's left behind by most other solutions now and old hat. Unfortunately.

    I am looking to switch to something else now as a platform for my projects but have a lot of time invested in RFPS and do like it, however I don't have many choices. Either I do or at the moment I am grounded and cant progress my work. Stuck without doing anything productive for two weeks now and its not funny :)

    Peter
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    The steps on page 24 of the manual could use a little polish. Here are some things I came across:
    Don't just add the PlayerCharacter script to your new model. Inspect the original, click the gear menu in the upper right of the Player Character (Script) inspector, and select Copy Component. then inspect your new model, click the gear menu on any component, and select Paste Component As New. Also remember to assign the Player Model animator controller to your new model's Animator.

    I set this to None.

    I selected the Player Character Model's Third Person Weapons child GameObject and pressed Ctrl+D to duplicate it. Then I dragged the duplicate to the new model so it's a child of the new model.

    Finally, remember to deactivate or delete the original Player Character Model GameObject. I just deactivated mine so I could refer to it later if I forgot to copy something from it.

    RFPS will create a clone of your model, but only one will be visible.
     
    Weblox likes this.
  9. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi Tony,

    Thanks for trying to help.

    I have tried again and followed what you have said there which is effectively what I was doing anyway....

    I am using a new Fantasy Character Model and when walking around for example everything looks fine, however Its when I pick up a weapon say a knife in first person mode of course its also fine but in third person mode the issue is when you click the button to attack and the player character model calls the relevant animation and strikes - the forward movement then allows one to see the other fps body (Visible Body) so I have two of them one full body which is animating and correct and the other the stiff FP body which should not be displaying of course but always does,...

    You would never know it exists until a weapon is used by using a mouse button so an attack animation is carried out.... if that makes sense.

    Anyway I give up .

    I have recently gotten hold of Emerald AI 2.0 which I perhaps wanted to use in my Fantasy project integrated with RFPS but cant do that with two player models showing up. Same for my shooter project which is massive and I also have a new different of course Player Character for that and have just got Tactical AI shooter to use with that but cant go anywhere with that project either as I have the same issue there with the different project and different player character.

    Looking at a you tube video just now showing game play of Emerald AI 2.0 they show integrated with RFPS their video only shows integration with First Person mode game play (hands and Weapon) but no Third Person Mode. I have not yet seen an example of this having been done.

    Anyway sorry to take up your valuable time.

    My head is long gone on this issue - repeating the same thing over and over again expecting a different result someone I believe said is the definition of stupidity :)

    Peter
     
  10. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi ronie635,

    Not sure if this is any help to you or others....

    I have a lot of cars/vehicles in RFPS and they have separate Glass windows....

    The vehicles have a mesh collider. The glass is a child of the car. The glass is given a mesh collider and not a box collider as the RFPS breakable object script attached to the glass expects. If I shoot the glass its breaks and shatters correctly and no bullet impact mark decals are displayed as would be the case if a box collider were to be attached to it.....

    However the console returns a non critical error message saying that the script is looking for a box collider...

    We can all either ignore the message or perhaps edit the script appropriately which is what should be done I guess, or should be done by default out of the box by the developers as otherwise having too many of these non critical errors is just not a good idea and just adds a lot of work when we update assets and they overwrite all our changes....

    Updating RFPS is a big pain in the butt as is and it usually takes me many weeks to recover each time I do. These days it should and other assets too should work with an Update button (not Install) at the asset store so that one does not have to overwrite a project in its entirety as if installing first time, but just update new/updated items.

    Peter

    :)
     
  11. ronie635

    ronie635

    Joined:
    Nov 22, 2016
    Posts:
    17
    Thanks for this, I actually might have tried this before, but I'll have to test it again and see...
     
  12. ronie635

    ronie635

    Joined:
    Nov 22, 2016
    Posts:
    17
    How can this be even when I move the whole gameobject far away from the car?
    Seems strange that it would collide with the car, because i've tried disabling them too...

    Anyhow, thanks again, going to try this later!
     
  13. TheBooBear

    TheBooBear

    Joined:
    Dec 15, 2011
    Posts:
    95
    I disabled the parts of the clone player model that were out of sync at runtime. I'm sure there is a better way of doing it, but this worked for me.

    Code (CSharp):
    1.  
    2.     GameObject playerModel;
    3.     GameObject playerModelHair;
    4.    
    5.  
    6.     void Start ()
    7.     {
    8.         playerModel = GameObject.Find("Player Character Model(Clone)/c05_top");
    9.         playerModelHair = GameObject.Find("Player Character Model(Clone)/hair14");
    10.         playerModel.SetActive(false);
    11.         playerModelHair.SetActive(false);
    12.        
    13.     }
     
  14. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi Drunken-Monkey,

    Thanks very much for that. So you have or aware of the same issue it sounds like :) Out of sync is a good description of the issue.

    Thanks for the code snippet. Can you tell me where that script should be attached (how/where you apply it).

    Thanks again.

    Peter
     
  15. TheBooBear

    TheBooBear

    Joined:
    Dec 15, 2011
    Posts:
    95
    I just attached it to the same Empty GameObject I have my GameManager attached to. I had to run the game and go to scene view and figure out which parts of the model was getting out of sync. In my case it was c05_top and hair14.

    Truthfully, I think there should be a better solution, I don't know why there has to be two model active at the same time.
     
  16. lagares

    lagares

    Joined:
    Nov 6, 2017
    Posts:
    5
    Question about weapon's bullets:

    I have an NPC character I created, but when I shot him, it moves a bit like it is registering a collision, but I OnCollisionEnter or OnTriggerEnter are not called, even when I see the object physically being moved by the bullets.

    Can anyone explain how the bullets work? Do they have colliders at all?


    thnx!
     
  17. ronie635

    ronie635

    Joined:
    Nov 22, 2016
    Posts:
    17
    I have dissappointing news for you:


    I used the exact code you provided, and here the "door left" being the parent object of the glass...
     
    Last edited: May 23, 2018
  18. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    OK Thanks for that. I will have another attempt as soon as I can get around to it and see how it goes.

    Peter
     
  19. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    More information is never disappointing. ;-) Good, so now we know the glass is definitely getting hit. The Hierarchy is configured as below, right?

    car
    meshes
    door holder
    window (tagged Glass)​

    If so, we should expect the "glassMark#(Clone)" GameObjects to be children of window. But they become children of car, right?
     
  20. ronie635

    ronie635

    Joined:
    Nov 22, 2016
    Posts:
    17
    Yes, quite precisely like that. I fiddled around yesterday, again with changing parents, moving the window way outside of the car, disabling all the colliders, changing tags.... The moment I move the window in the hierarchy outside the car-parent, this problem goes away.
     
  21. Michael2D

    Michael2D

    Joined:
    Mar 5, 2014
    Posts:
    17
    Hi.
    I have an issue...
    I tried to use blood effect for my zombies... But whatever I put it on loop and put it to flesh.. The effect is playing automatically and not showing on zombies after hit.. anyone to tell me where is the mistake?? Also I tried but I just cant get RCC work because if I uncheck - hide player root or something to have to root for enter exit .. my whole player shutter + guns are shuttering.. nono its not low pc its just doing the project.

    also I noticed that I cant even change size of player. if I do. his legs stay at jumping possition and I cant move at all.
    Developer not answering so... If anyone could help!! I would really appreciate!
    Thank you.
    Michael
     
  22. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi Drunken-Monkey,

    Tried the script I updated it to refer to my Character but Unity wont get past the first reference to GameObject used in script and errors in console so the game wont run :)

    Oh Well, back to the drawing board....

    Why on Earth I want to know are we still having to use a system which has such a complicated Player character system which relies on models which are still legacy and we cant change Player character via a modern mechanim system?

    No worries I will just stop developing or move on to something else.

    :)

    Peter
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    I think you're going to have to trace through with the debugger. After line 338 (tempObjTransform.parent = hit.transform;) tempObjTransform.parent should point to window. If not, you'll need to figure out why. Otherwise continue tracing through to see if it changes. Maybe another script is moving the decal afterward.
     
  24. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    Hi,
    I just bought this asset and have problems with changing the character. My player is made with fuse and consists of several part. The problem is now that in the clones that's generated in play mode only the body skinned mesh renderer gets disabled. When I attache a weapon now some parts of the body are rendered double, but unfortunately only one is animated. Where can I change that all skinned mesh renderer in the clone are disabled.
    SkinError.png

    Other question, I can replace the character for third person view, but how do I replace the arms in first person mode?

    Regards
    Frank
     
    Last edited: May 24, 2018
  25. TheBooBear

    TheBooBear

    Joined:
    Dec 15, 2011
    Posts:
    95
    Peter

    if you are getting errors on the first reference to GameObject, then your script might not be a mono behavior. Here is the full script i use. just remember you have to change the c05_top and hair14.


    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6. public class ModelCleanUp : MonoBehaviour
    7. {
    8.  
    9.     GameObject playerModel;
    10.     GameObject playerModelHair;
    11.  
    12.  
    13.     void Start ()
    14.     {
    15.         playerModel = GameObject.Find("Player Character Model(Clone)/c05_top");
    16.         playerModelHair = GameObject.Find("Player Character Model(Clone)/hair14");
    17.         playerModel.SetActive(false);
    18.         playerModelHair.SetActive(false);
    19.      
    20.     }
    21.  
    22.  
    23. }
     
    Mark_01 likes this.
  26. TheBooBear

    TheBooBear

    Joined:
    Dec 15, 2011
    Posts:
    95

    There is one other person and myself trying to figure out the same thing you are experiencing...
     
    Last edited: May 24, 2018
    Mark_01 likes this.
  27. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    I looked into the PlayerCharacter.cs script and it seems that the character must be one single mesh. If he consists of multiple meshes only the renderer of first one in the clone will be disabled. You can try this, start play and then disable all skinned mesh renderer in the clone and the problem is gone. But this fact is a no go for me, it must be possible to use characters with more then one mesh.
     
    TheBooBear and Mark_01 like this.
  28. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    +1 ..and probably many more. @Azuline-Studios could you pretty please make this easier?
     
  29. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    I found a quick hack for my problem!
    In PlayerCharacter.cs around line 225 add;
    Code (CSharp):
    1. public float tpswitchTime;
    2.     private float modelPosSmoothSpeed;
    3.    
    4.     // new
    5.     private SkinnedMeshRenderer[] allFpSkinnedMeshes;
    6.    // new end
    7.     void Start () {
    Then around line 272 add:
    Code (CSharp):
    1. fpBodySkinnedMesh.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
    2.      
    3.         // new
    4.         allFpSkinnedMeshes = fpBodyObj.GetComponentsInChildren<SkinnedMeshRenderer>(false);
    5.        // new end
    6.         //scale down arms and head of first person visible body object, so they don't show in the camera view
    7.         if(fpBodyAnim.GetBoneTransform(HumanBodyBones.Head)){
    Then around line 456 comment 'fpBodySkinnedMesh.enabled = false;' out and enter:
    Code (CSharp):
    1. myTransform.localRotation = Quaternion.Slerp(myTransform.rotation, Quaternion.Euler(tempBodyAngles), Time.smoothDeltaTime * slerpSpeedAmt);
    2.  
    3.                 //fpBodySkinnedMesh.enabled = false;
    4.                 // new
    5.                 foreach(SkinnedMeshRenderer skinnedMesh in allFpSkinnedMeshes)
    6.                     skinnedMesh.enabled = false;
    7.                 // new end
    This might be a dirty hack, but finally it works;)

    Azuline-Studios should provide a better solution for this problem since there is only one slot for the alternate body material, so the whole code expects a character consisting of one single mesh:(
     
  30. TheBooBear

    TheBooBear

    Joined:
    Dec 15, 2011
    Posts:
    95
    I can confirm this works. I had a small external script hack, but this is mo-better.. lol
     
  31. lagares

    lagares

    Joined:
    Nov 6, 2017
    Posts:
    5
    bump...

    still, haven't figured it out. Sent an email to @Azuline-Studios yesterday but still nothing...

    tried to understand the code, but can you say spaghetti...

    I suggest the developer get a nice Object Oriented book and refactor the hell of this code... separate the functionality into focused classes/components and you be happier !! and changes/maintenance would be way easier...

    anyway
     
    franky_li and Mark_01 like this.
  32. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    There are two additional changes that should be made to make my hack consistent.
    Around 272:
    Code (CSharp):
    1. fpBodySkinnedMesh.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
    2.      
    3.         // new
    4.         allFpSkinnedMeshes = fpBodyObj.GetComponentsInChildren<SkinnedMeshRenderer>(false);
    5.         // new end
    6.         // new
    7.         foreach(SkinnedMeshRenderer skinnedMesh in allFpSkinnedMeshes)
    8.             skinnedMesh.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
    9.         // new end
    10.         //scale down arms and head of first person visible body object, so they don't show in the camera view
    Around 440:
    Code (CSharp):
    1. if(tpswitchTime + 0.001 < Time.time || walkerComponent.sprintActive){
    2.                     //fpBodySkinnedMesh.enabled = true;
    3.                     // new
    4.                     foreach(SkinnedMeshRenderer skinnedMesh in allFpSkinnedMeshes)
    5.                         skinnedMesh.enabled = true;
    6.                     // end new
    7.                     modelPosSmoothSpeed = CameraControlComponent.lerpSpeedAmt;
    Still not found a way to remove the sleeves and the gloves from the first person view, which should be possible since the animated models have naked arms, so they are added somewhere, but where?
     
  33. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    163
    I found that the sleeves from the first person view can be removed by deleting SoldierSleeveL.fbx and SoldierSleeveR.fbx form the RFPSP/Models/Weapons folder, there is no error after removing them, but the cloves are baked into the animations
     
  34. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    ... okaaay ... a quick update on RFPS Zipline, guys ... basic code is nearly done, currently testing some water interactions when riding a zip line :) I will also add another prefab version, which will be vertical climb zipline as well. Will update later with more news, before community release date, here ... start points are now marked by green light, and end points with red, for easier editor work. Now is enough to touch the wire by your rfps player in any way, to start riding (simple). Stay tuned, everyone.
    VranicStudiosCom
    RFPS Zipline-26-05-2018-Progress.JPG
     
  35. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    I changed the player Arms (and Weapon) in First Person Mode by replacing a FP weapon/arms (arms are part of the weapon models in the weapons folder) and by exposing the FP weapons to view attached to the FP visible body.

    Not quite sure if you can easily change the arms separately from the weapon, retaining the default weapons as i just replaced the default weapon and arms as one combined animated model. I have only in fact ever replaced one as a test but would like to replace all weapons (arms) and add additional weapons for better ones, together with better, improved weapons, muzzle flash and so on. My game calls for particle weapons and effects too suitable for sci-fi environment games but RFPS has none out of the box.

    There is a Video or instructions in the Manual available but as usual its not perhaps very well explained or particularly easy to follow and possibly in need of updating. Its not too bad and at least works. The wholes systems could do with updating and up to date videos and user guide.

    **********************************************

    I would like to take the opportunity to thank everyone who has helped sort the Clone Custom Player Character issue - that has fixed the problem for me so it would seem. A big thank you to you all for being so kind as to help those that need it.

    Peter

    :)
     

    Attached Files:

    Last edited: May 26, 2018
    Mark_01 likes this.
  36. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    On another note.

    Have the New player character working now O|K as said.

    I am using Tactical AI Shooter for some enemies that I want to have better AI with a wider variety of behaviours and this works fine...

    This is a Long Shot... I am using TonyLi's, Change cross Hair color script for RFPS Characters. I dont suppose anyone else has the Change Cross Hair color script working with TAIS or any other AI system? or perhaps alternatively an enemy healthbar working with any enemy other than RFPS ones? That I can do, but cant get any of them working with TAIS enemies.

    Looked around the web, Google, Unity forums, asset store and so on and edited scripts and so on but RFPS does not want to play :)

    I don't really like health bars so may end up marking the TAIS enemies some other way with Red. Perhaps they may all have to have Red hats :)

    Thought I would ask and bump the thread a bit as its quite here :)

    Thanks

    Peter
     
  37. rnekkalapu

    rnekkalapu

    Joined:
    Nov 27, 2017
    Posts:
    1
    Is there any cover system in this?
     
  38. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Quick answer. No. Sorry.

    Peter
     
  39. Mucossa

    Mucossa

    Joined:
    Feb 25, 2018
    Posts:
    34
    how to set auto run and shoot while running?
     
  40. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    I have an enemy in my game that is basically a blob of flesh with tentacles. It doesn't move, but is melded to the floor. I cannot get this enemy to take damage. I've applied different colliders as triggers, applied the correct scripts, it just won't take damage. Obviously I can't add a rag doll to it either. Any advice?

    Also, I've somehow screwed my sniper up where the muzzle flash does not flash on the weapon or the player model like my other weapons. I changed out all my weapons months ago, and the sniper is the only one doing this. I've compared it to the original sniper in the heirarchy, and it's the same. I'm out of ideas.

    Thanks.
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Is the layer correct? Make sure it has the same layer as the example zombie.

    Does the muzzle flash anywhere in the scene? Maybe its position or scale is offset.
     
  42. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    It flashes at the end of the barrel, like my other weapons.

    Thanks @TonyLi
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    I assume you mean the Tag dropdown is set to Flesh. Is the Layer dropdown set to NPCs?

    I'm not sure I understand. Is this the way you want it to work?
     
  44. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    Let me rephrase...the muzzle flash is rendering in the correct spot at the end of the muzzle, however when I fire the muzzle light is not rendering light onto the weapon or the characters arms like my other weapons.
     
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Does your monster have a collider, rigidbody, CharacterDamage, and an enabled AI component?

    Are the layers the same as with the other weapons? It might only be rendering to the main camera, not the weapon camera.
     
  46. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    Ah...a rigid body. Let me try that. I don't have one on there, but everything else I do.

    I'll check the layers and make sure.

    Also, I was interested in the 1 camera setup, but I can't find a good value where the weapons aren't either blurry, or being clipped through. Any suggestions?

    Thanks a lot @TonyLi
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    No, sorry. That's why the two camera option is there.
     
  48. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    Well, the rigid body trick didn't work. I even put all the needed scripts, layers, tags, and a RB on a simple cube and reduced its hot points to 20 with a dead replacement. The cube was taking damage, but it just would not die, even though it could damage me. I have other enemies set up that work, but this one is giving me a headache.
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Are there any warnings or errors in the Console window?

    If it's taking damage -- that is, the Character Damage component's Hit Points are decreasing -- then you might want to use the debugger to step through the code. Set a breakpoint on this line:

    Code (csharp):
    1.         //Kill NPC
    2.         if (hitPoints <= 0.0f){
    3.             onDie.Invoke(); // for save addon by PixelCrushers <-- THIS LINE
    If you're not comfortable doing that, then make sure exactly one rigidbody exists in monster's entire GameObject hierarchy, and that you've assigned a Dead Replacement prefab.
     
    Oderus_Urungus likes this.
  50. Candac59

    Candac59

    Joined:
    Sep 18, 2015
    Posts:
    106
    Hello,

    I have a problem with the wave system. I followed the integration tutorial with Emerald AI 2.0, unfortunately in play mode the wave count does not appear and I have this error in the console:

    IndexOurOfRangeException: Array index is out of range.
    WaveManager+<c_Iterator0.MoveNext () (at Assets/RFPSP/Script/AI/WaveManager.cs:150)
    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumator, IntPtr returnValueAdress) (at C:/buildslave/unity/build/Runtime/Export/Croutines.cs:17)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumator)
    WaveManager:Start() (at Assets/RFPSP/Scripts/AI/WaveManager.cs96)