Savepoint with a Global Variable question

Hey, I suspect this has an easy answer, but I just can’t figure it out myself.

My game is a larger open world, so the save points are all on different scenes. I want my character to be able to stop at a tent, save, and continue on. And if they die in a different scene, I want them teleported back to that tent they saved at.

I played around with the sample platformer that lets you land back on an old platform you died from, but that’s all scene variables, not global ones.

What would yall suggest as the easiest way to make my save-point system happen? Thanks in advance!

Perhaps a global structure variable, something like:

  Scene: "scene_name"
  Xpos: x_position
  Ypos: y_position

Then you can save the x and y position of any scene. And if you need multiple save points, just use an array of structure variables.

Use internal storage to save the structure that @anon14980890 has suggested. Then it will persist when the game is closed and opened at a later time (as an extra to what you’d like to do).

Here’s a thread about saving scores, which can be easily adapted to suit your requirements.

Thank yall so much!! I’ll get myself a good look through of that thread. I can already tell this is gonna be SO helpful!