I am developing a infinite running game in which when a charcter dies i want it to respawn it on the same location it died i searched alot but am not getting my solution can anyone tell me how to do that thing in blue print
you must have some OnDeath Event, just cache the transform and use it to respawn at the same location
Here’s a tutorial:
You can follow the steps included here and just store the actor’s location on the despawn event. Then split the “Spawn Transform” pin of the Spawn Actor node by right clicking on that pin and clicking on the split option, and connect the vector type variable that stores the player’s death location into the exposed “Spawn Transform Location” pin. You can also do the same for the other aspects like rotation if you want.
Ummm… @Auran131 your post wasn’t visible to me when I posted this The website do be like that sometimes…
no problem, a video is more useful anyway
i think you maybe using player spawn logic in player controller? like, when you die, you can send the current location at the time of dying to controller where it uses that location and spawn the player back again at that death location
When you say infinite runner, you mean like 3D World Runner on the NES? Or Space Harrier on the Genesis / Arcade ?
Well you first want all your camera movement or sense of movement to stop, then right before you destroy the actor take the actor’s location feed it through a Do Once for a once time pulse of where they currently are, store this in the current game mode for the map, then on respawn use that new variable as coordinates.