! Newbe - Not overriding some methode/attribut of a function (_ready)

Godot Version



Hi, I’m new to dev and Godot
I try to find a way to not overriding the function _ready, in my case:
Got a parent class projectile with a var projectile_speed: int and a _ready function with inside a timer.start for auto-destruct with queue_free.
Then in my child I want to set my projectile_speed, so I try with @onready the var but I get an error “var allready exist in parent class”.
But if I set the var inside the _ready function, my timer.start is overrided.
I found some topic with _init function and try it, but no result.
It’s probably some basic stuff I dont know, any suggestion ?

Of course if I set the timer.start inside the child _ready function it work, but just for understanding if there is a “less” code possibility

From here:

To call a function in a super class (i.e. one extend-ed in your current class), use the super keyword:


This is especially useful because functions in extending classes replace functions with the same name in their super classes. If you still want to call them, you can use super:

func some_func(x):
	super(x) # Calls the same function on the super class.

If you need to call a different function from the super class, you can specify the function name with the attribute operator:

func overriding():
	return 0 # This overrides the method in the base class.

func dont_override():
	return super.overriding() # This calls the method as defined in the base class.