#Calling inherited functions

5 messages · Page 1 of 1 (latest)

vague coyote
#

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.

ashen whale
#

eg inside the child script

func _ready():
    super() # calls parent _ready()
    # do extra child stuff here
vague coyote
#

thanks :)

#

that did the trick