0

I have a dedicated scene for my games character. I have another scene for "Level 1." I added a script to the root node of "Level 1." How can I use that script to both write the character node's x position to a variable, and then print something to the console when the player reaches a specific x position?

If such a result isn't possible with my current setup, please describe what changes I must make in order to make it possible.

Thank you.

AJN
  • 29
  • 1
  • 3
  • 1
    It would be helpful if you were more specific about what it is you're trying to accomplish – Aaron Record Feb 25 '21 at 16:39
  • If you want to change it's position you should look into a movement script for a character but instead of moving the Level1 Node you get the Reference to the Player Node at the start of the game and move that. – IndieGameDev Feb 26 '21 at 06:50
  • Does this answer your question? [Clean code: preventing unexpected behavior when caching mutable instances](https://stackoverflow.com/questions/66576071/clean-code-preventing-unexpected-behavior-when-caching-mutable-instances) – Oliort UA Mar 14 '21 at 14:27

0 Answers0