Hello everyone, so my issue is pretty straight forward and the tittle says it all.
For some reason the command won’t execute when I am using “destroy actor” with “delay”, not sure if that’s a bug or it isn’t possible to execute the command after using “destroy actor” or if I am doing something wrong.
Any suggestions? I would also like to know if there is another way of restarting the level(game) if someone knows, thanks in advance for any answer!
You’re destroying your actor before calling the delay function. Destroy actor makes sure that the remainder of your execution won’t happen. You shouldn’t need to destroy it either since you’re calling restart level.
The reason it might be working without the delay is because destroying an actor takes a tiny bit of time, depending on the size of your actor.
Sentura is right, restarting the level will reset the actors as well, but for any future issues similar to this you can try using SetLifeSpan node to defer destroying the actor by a fixed amount of time.
Thank you for the help guys!
Reason why I am using destroy actor to begin with is that when the pawn falls to death, the camera keeps following him as he is falling(while being invisible). So this way I forced the camera to stop following the pawn, though I had no idea that: “Destroy actor makes sure that the remainder of your execution won’t happen”.
EDIT: And thanks phoboz for the SetLifeSpan node, I did try using it, but the same problem happens, the command wont execute if I put a delay in between.