Proper way to destroy replicated Actor?
Can anyone in here explain how to properly destroy a replicated object?
For instance, if I have a replicated Actor blueprint and I want to destroy the Actor while running an internal function, can't I just use a run-on-server RPC and Destroy Actor in the event?
When I try this, it doesn't work. It also doesn't work if I try with multicast (thinking maybe it's only getting destroyed on server but not on clients). Is there something basic I'm missing? Do I need to call into game mode? (that didn't seem to work either)
This would be a server owned Actor with a function triggered by a pawn overlapping. The function definitely runs, but Destroy Actor doesn't destroy actor.
Specifically, the functionality is "reduce health on the Actor, if it gets to less than 0, destroy it". Health is verifiably 0, as far as I can tell "Destroy Actor" should run, but no errors are displayed and the actor is not destroyed. What gives?
Follow this question
Once you sign in you will be able to subscribe for any updates here