Hi.
I’m working on a local multiplayer game. I want to make it such that when an Actor falls below the kill Z, instead of being destroyed, I want to override the functionality to teleport the pawn to a safe spot instead. Which method is the correct one to override without causing issue? There are so many relevant methods… Destroy(), OnDestroy, Destroyed, BeginDestroy in AActor.
I would instead make another check that causes you to teleport up BEFORE you get destroyed. Span a trigger volume covering the entire level or check using the tick function that you are not under a safe height. Overriding the destroy function is very easy to ■■■■ up and cause bugs and crashes.
1 Like
Thanks. I really wanted to avoid this. I would have preferred to just have an override for the destroy function to allow for more versatility with less overhead in the level design but if that’s the way it must be so be it.
with Pawn you can use virtual void OutsideWorldBounds() override;
1 Like