Destroy happening next frame?
Hi all,
I was wondering... When you use 'destroy' to remove an object, is that object removed from the scene immediately and any further script is stopped or... does the destroy happen next frame and the scripts are still going on?
I have a bug that makes me think that destroy is the frame after the call and scripts keep going on until the next frame too...
I was wondering... When you use 'destroy' to remove an object, is that object removed from the scene immediately and any further script is stopped or... does the destroy happen next frame and the scripts are still going on?
I have a bug that makes me think that destroy is the frame after the call and scripts keep going on until the next frame too...
Answers
When game.over is true
destroy this actor
log debugging statement "still alive!"
May destroy the actor at the same time it logs the statement. So to be save, try to avoid a situation where a behavior is running parallel to a destroy behavior.