I can see tutorials on how to respawn actors when they are destroyed, but not when they don’t get destroyed. Is it appropriate to use a trigger volume for when the giant falls into out of bounds/world, and have the same player respawn or teleport to a spawning location near the ocean?
Yeah, absolutely. You could use the Set Transform Blueprint, that fires up when the giant enters the trigger.
By teleport you mean destroying then respawning the Actor?
If so, the basic difference, I guess, is that it won’t be destroyed, just simply moved, so the construction script, doesn’t fire up, and any data that is bound to that Actor do not reset. Hope this helps
Cool, but can you also explain why teleport doesn’t do the same effect?
I’m not familiar with the example you’re talking about (Giant/Ocean), but a teleport node should work, if that’s what you’re referring to. It’s essentially the same thing as setting a transform, except it doesn’t do any scaling.
Whoops sorry got carried away with the contents of the game. Pretty much Player and Fall out of World in a sense. Pay no mind to details.
The teleport node in blueprint scripting never triggers. Once triggerOverlap begins, setActorLocation for Player Pawn works fine, but teleport using the player pawn as target doesn’t trigger.
Also, what I think would be a greater result if possible was to spawn the player back to where they last were on a navigable plane before falling off the world instead of a spawn location, but running a ticking call to remember the player location seems counterintuitive when the location will save even when the giant is off the world before overlapping with the trigger volume below. Would this be possible?
I’d have to look at the specifics of your blueprint to see why teleport isn’t working, but if setting the location works for you, there really isn’t any reason to bother with it, at least not in this context.
There are a lot of different ways to handle this scenario of tracking the last point on a “valid” plane. I would have to experiment with it, but off the top of my head, I would probably setup trigger volumes somewhere inside the plane, where it’s safe, and every time the player leaves those locations, (EndOverlap) it records the player location in a variable (or an array if you want multiple options). Then use those locations as your spawn points.
Again, there are a lot different ways to approach that, but that is the simplest one I can come with at the moment.