I have a blueprint that tracks players. The range finder has a promote to variable that gets set as the target player. The issue is when the actor gets destroyed the variable keeps the player set and won’t go back to default zero value. How do I check when a promoted variable becomes destroyed and then reset it to null?
You want to call IsValid on the object before using it to make sure it is safe i.e. alive. If not returns false you know the object has been destroyed and you can clear that variable.
Appreciate +1 if this helped 
-Matt
Yup that did it. Thanks a bunch. I appreciate it a lot the end blueprint solution I ended up with is mindbending. Next up jetpacks in zero-g with roll, entering exitting vehicles blueprint, 3rd person character movement animations. I’ve made tremendous progress in a short time with the help of the community.
For anyone referencing this in the future the solution requires two important factors.
-
Use the f not the ? isvalid.

-
Make sure your turret range finding target component isn’t targeting other projectiles and it’s only targeting the actors you want otherwise there will be very confusing behavior. It’s an easy oversight to make.
-Mike
Actually use the ‘?’ version not the ‘function’ version. The ‘?’ version is a macro that includes the branch node you are using. Both are equivalent but using the macro is cleaner than the function if it’s used for branching like you are 