Hello, my friends. I'm making an infinite runner game, like Temple Run, but in 2D. By example:
az648995.vo.msecnd.net/devices/2015/01/Temple-Run.jpg
I'm trying to make a "save position" system, where the player spends an item to save the position where did he died, and then restart from that position, like a check point, but in any place of the platform.
The game is using some pre-build platforms - that are tilesets - , and then it picks one at random, and when the player touches the trigger, it puts one in sequence of the one that is already running. Like this:
drive.google.com/file/d/0BzI4Lq7yvoVMWWVpbEloME80Uzg/view
An example of pre-build platform: drive.google.com/file/d/0BzI4Lq7yvoVMb183OFZzazB6VzA/view
My problem is: how can I make the game know in what platform the character died? I can save its coordinates in a variable, but how can I make the game know what platform it has to build, in order to the character spawn in the nearest place? I've tried to use the "Save Game" action, and it indeed worked, the problem is that when I use the "Load Game", the character end up spawning in the same trigger that made him die, a.k.a. "a hole", and the game can't proceed. I've tried to save the UID of the platform that is running, but I don't know how, or if it's possible to create an object only according to it's UID.
I'm struggling in here, since I don't want to use "tricks", like creating a checkpoint in front of every hole, and make the check of which one was the last.
Can anyone help me? Thank you, guys ^^
Sorry by the URLs, it isn't accepting imgur links to set an image.