Getin back to the Tilemap.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Syl


Would anyone tell me how to get back to my last position in a tilemap after having entered and exited a new scene?


Can you elaborate?

Merlin1846 | 2020-01-30 20:02

That is, my player travel on a’ tilemap’(multiples hex sprites aligned together), and enter zones of first person view with full images as the setting of a point and click game.

Just wanna know how to get back to its previous position on the ‘tilemap’ when he entered the zone? Or how to assign exits on the ‘tilemap’?

Syl | 2020-01-30 20:41

:bust_in_silhouette: Reply From: Captain.Susuwatari

Not Tilemap specific, but…

You could store the player’s previous position in global scripts (autoloaded script).
If you enter the scene again, you could check the position stored in the global scope and apply it (in the _ready() function)
(At least that’s what i do when i re-enter my tilemap from another scene and it works…)

For global scripts please have a look at:

Yes, seems the best to keep datas, though the docs about it is a bit short. Could you be a bit more specific about your scripts?

Syl | 2020-01-31 09:31