How to inherit a signal?

Godot Version

4.2

Question

I have a scene with a script that contains a signal. From that scene I have created a an inherited scene with another script and hope to retain the signal; is that possible?

so in the parent scene I have:
signal attack(pos, type)

and in in the inherited scene I want to emit the signal
attack.emit(x,y)

Maybe make the script a custom class, and use another script that inherits from that?

2 Likes

Yes, that will work. Subclasses inherit their parent’s signals.