0 votes

Basically in my game I am trying to make it so that when they enter a house and then leave they come back at the spot at which the door is... I'm not completely sure how to do this but I have this code right now which isn't working and probably for good reason. Everytime I pull it it changes my scene but my position is the default position the player is set at...

This is called on by Dialogic's get node (dialogue addon)

In house script

func tp_back():
    get_tree().change_scene("res://Scenes/World.tscn")
    Global.global_position = Global.town_exit

In global script

var town_exit = Vector2(-21.336, 1202.667)
in Engine by (25 points)

Should the actor be in different parts of the scene?

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.