0 votes

Hey!
I have a player scene and i am implementing grid based movement. I want to access and change the position of the player from another scene which is a TileMap. How do i go about doing this? Also i do want the player to be a separate scene. The player is a sprite type of node.
Thanks!

in Engine by (22 points)

1 Answer

+1 vote
Best answer

Typical methods would be the same as accessing any other node. So...

  • Get a reference to the player node from the scene tree and set its position directly
  • Use a signal to broadcast the new position and have the player receive and handle the signal
  • Store the player object in an Autoload so it can be referenced from the other scene
  • ...
by (21,732 points)
selected by
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.