I found a way to create a function that can act as a super class in Godot. Node tend to act like classes anyways. I found that it is best to create a node and then attach a script to it. Put all other nodes in script under this node. By doing so, you can write you Gd-script as if its inheriting from a class. I believe under the hood, all nodes are classes. Correct me if I am wrong. Another good advice is to use print() statements to check your objects. if you depending on you script you can access object directly in you node using self.get_child(0). Anyway using the script in the node above you could access a method in any of the lower scripts like this self.get_child(3).test(). Assuming test function exits, you can now use this method to check you game objects. You can also add child nodes like this self.add_child(node) to add to the parent of your current scene.

  • xyz replied to this.

    Jack21 Godot is highly object oriented. Every script you write is in fact an inherited class. It's super (parent) class is determined by extends statement that is required at the start of each script.

      4 days later

      xyz True, I read the documentation; However, I recently discovered how to utilize Object Orientation more in Godot game programming. I wish I would of found this out sooner, but I can refactor my first game when the time comes.

      • xyz replied to this.

        Jack21 Don't worry, you'll apply your newly attained knowledge in your next game 😉