Doing the tutorial you have a death battle event where you basically adjust the camera, animate the death animation and then fade object... once that fade object is done then the enemy is gone. I tried to add a wait here but that leaves the body on the ground until the wait time is over and then the enemy is gone and I get to the victory gui box.
So what I would like to have here is the possibilty to let the body lie on ground for a certain amount of time and then despawn. However this shouldn't keep me waiting... so as soon he is animated and being dead lying on ground then I would like to get the victory gains so I can continue and the enemy body still lies on the ground until either the time I set until despawn or during the rest of the game.
On the enemies combatant I went to Death Settings and enabled "Keep Prefab". This will let the prefab stay "forever". So not really able to set a timelimit for how long it shall stay here though.
You can use the Destroy Object step in your combatant's death event to destroy the game object after a defined amount of time without waiting for it :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Since the Keep Prefab caused some problems for me then I decided to try your Destroy Object on my death battle event. I couldn't get it to work though :( I added it in the end and set it to Actor/user and Destroy after time and then saved it. However when playing it still destroys the prefab directly after the death animation and wait.
With disabling Keep Prefab that's to be expected. Keeping the prefabs is most likely not causing your problems but something else in your setup - still need a test project to look into it :)
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
On the enemies combatant I went to Death Settings and enabled "Keep Prefab". This will let the prefab stay "forever". So not really able to set a timelimit for how long it shall stay here though.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Will see if it's needed.... would only be if I have any performance issues.. otherwise I would like to have the corpses around:)
Since the Keep Prefab caused some problems for me then I decided to try your Destroy Object on my death battle event. I couldn't get it to work though :( I added it in the end and set it to Actor/user and Destroy after time and then saved it. However when playing it still destroys the prefab directly after the death animation and wait.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!