Overview
I have a base scene for creating enemies
This base scene has a set get for turning the process, collision (and other things all enemies share in common) on and off
Using the base I created enemies
Each enemy has different extra things from the base that need to be turned on and off
Issue
I found out that only the children setget function is called, the parent is never called.
This also happens with signals, when a base parent have a signal connected to a function with base logic that is common to all the children, the children cannot add extra behavior to it.
Example
in base
var is_active: bool = true setget set_is_active
func set_is_active() -> void:
# do something
in a child
func set_is_active() -> void:
# do extra things
somewhere else
child.is_active = false
this will only run the child do extra things, not the base do something
I think I am doing this wrongly, could anyone advice me on this please?
For now I repeated the common logic within different enemies but would love to be able to have it just in the parent..
Thank you in advanced!