The docs say that in GDScript, the .
can be used in the same way as super
in other programming languages. My issue is that I receive the error Invalid call. Nonexistent function 'do_something()'.
when calling a function in the parent from within the child. The code is as follows:
Parent Script:
extends Node2D
const ChildScript = preload("path_to_child_script")
onready var Child = ChildScript.new()
func do_something():
print("something")
func _physics_process(delta):
Child.call_parent_function()
Child Script:
func call_parent_function():
.do_something()
What is the correct way to do this?