#Calling inherited functions
5 messages · Page 1 of 1 (latest)
super() calls the parent function
eg inside the child script
func _ready():
super() # calls parent _ready()
# do extra child stuff here
5 messages · Page 1 of 1 (latest)
How do I have a child class call the parent version of a function and then do some extra stuff? I found examples from Godot3 using the .function() syntax to call parent version in redefined child version, but it doesnt appear to work in Godot4. Any advice would be appreciated.
super() calls the parent function
eg inside the child script
func _ready():
super() # calls parent _ready()
# do extra child stuff here