#Help, i am stuck in creating a death mechanic
1 messages · Page 1 of 1 (latest)
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
So when the player collides with the checkpoint it sets a new spawn point?
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
i made a function on the main script and used it on the death function, it outputs an error though
Your steering player to those coordinates, but you need to set $player to those coordinates
Setting
like this?
Yeah, it should be that way
i already set player as a variable though is the $ necessary?
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
i will try raw linking it
Ok, sorry I couldn't help more
it's okay, thank you for the help
I found the solution. i put the respawn and death function in the same script. im an idiot🤣