This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes


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


in Engine by (326 points)

Can you elaborate?

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'?

1 Answer

0 votes

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:

by (41 points)

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?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.