How to check how long an actor has been spawned
I'm trying to create to type of actors that overwrite each other (dots on the ground at the moment). But I want them to destroy the other only if the other is older ( so that both don't get destroyed every time they overlap)
Thank you !
asked Apr 30 '15 at 08:47 PM in Blueprint Scripting
I think the simplest way to do this is just to add a FDateTime variable (call it "Lifetime" or some such) to your actor. When your actor is constructed you can just set that variable to FDateTime::Now(), then just compare the two actors lifetimes when a collision happens and run whatever logic you want.
answered Apr 30 '15 at 08:57 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here