#Help, i am stuck in creating a death mechanic

1 messages · Page 1 of 1 (latest)

somber finch
#

You could keep a checkpoint position variable in your player and if a checkpoint has been reached, respawn the player there on death

jolly kelp
#

Yeah, thats basically what i did for a game awhile back. You would want to set your Player coordinates to Vector2(XRespawnPoint,YRespawnPoint) or something of the sort to replace the reload scene line

gray root
jolly kelp
#

yes, that is what i would do, you can store the other checkpoints as like CheckPoint1 CheckPoint2 and so on, and the current checkpoint as something like CurrentCheckPoint and if you store them as a vector2 you can just do something like $Playerthingy.position = CurrentCheckPoint

#

and when going to a new checkpoint just do CurrentCeckPoint = CheckPoint2

gray root
jolly kelp
#

Your steering player to those coordinates, but you need to set $player to those coordinates

#

Setting

jolly kelp
#

Yeah, it should be that way

gray root
jolly kelp
#

Hmm I dont know. The way I normally do it is just to use the raw link, in your case $Charachter/player, I don't have a lot of experience with replacing those as variables

gray root
#

i will try raw linking it

jolly kelp
#

Ok, sorry I couldn't help more

gray root
#

it's okay, thank you for the help

gray root