About 'Global Scripts'!

In this video (objectives)…

1 Create a singleton 2 Move node paths to the singleton 3 Allow nodes to be moved and renamed without breaking anything

After watching (learning outcomes)…

Learn how to use a global script to solve the script referencing problem!

(Unique Video Reference: 14_HD_GDT)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

Hi Yann, I was wondering why in the ready functions we use self.get_path() (the path) instead of just using self (the object reference)?

Honestly, it was because using globals everywhere makes me nervous so I automatically put in an extra step to stop myself using them without thinking. You could very easily use .self and it’d work fine :slight_smile:

I’ve pushed a quick update to this video so that people don’t have to use get_node() every time they use a global. Seems the extra step wasn’t making anyone happy!

3 Likes

Privacy & Terms