Adding onto an inheriting class's process function from a subclass

Godot Version

4.3

Question

I’m creating enemy classes for my game. I have a set of behaviors already implemented, including code that runs under the _process function. Now that I am creating subclasses for more diverse types, I want to edit the _process function.

The issue is whenever I try to add the _process function to my subclass, all the code under the function from the base class is overridden.

Is there a way I can add onto the _process function without overriding it?

You call the super class via:

func _process(delta: float)->void: 
	super(delta)
    ~my sub class code~
1 Like

That works perfectly! Thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.