hi, im getting those pending kill error messages, and framerate is slowing over time as enemies are killed.ie their health reaches zero, and play explosion particle, sound effect, camera shake,
I tried adding destroy actor, and tried destroy component, but its not working, can you guys help. thank you.
Sorry, this screenshot is too small, can’t make anything out.
The error you get contains a reference to the function that’s called after the actor is destroyed. Where does it lead you? You have to determine why that function is called after the actor is destroyed.
What’s happening is that when the actor takes a hit and it’s hp is already 0, and “Destroy Actor” already run, the function will run again, as Destroy Actor just enteres the actor in a Destroy Queue and isn’t done necessarily on the same frame.
But specially when it takes damage from more than one source, and is killed by the first, but still gets hit by the rest.
When you do the damage, check if actor isValid first.
use the node isValid after set relative scale 3d. in the object put the reference to shipmodel. and from the isValid pin drag out and then use DestroyActor. also im not sure since i didnt read all the chats where the blueprint is placed. because since u dont have anything plugged in DestroyActor it should destroy the actor this blueprint is in. if u wanna destroy the ship model drag the reference of ship model and plug it into the destroy actor’s target.
hi thanks, i did exactly that, but getting the same error. I also tried destroy component, as well as destroy actor. no luck.
Is it related to Get Health, there is only 1 other instance of get health in the AI_Ships script (attached) And the first script (the one we are trying to fix) is the only script where 'ship model’is referenced. Do I even need ship model reference, are there any workarounds, etc thanks