0 votes

Probably a silly mistake on my part but I can not figure out why this happens now...

emit_signal: Error calling method from signal 'attack_started': 'Sprite(Weapon.gd)'::_on_RangedWeapon_attack_started': Method not found...

On Weapon.gd I have signal attackstarted and signal attackfinished, and they are called using emit_signal...

And they are connected in RangedWeapon scene via editor. On RangedWeapon.gd which extends Weapon.gd (which extends Object.gd)...

Can the issue come from duplicating the weapon, using .duplicate() ?

Godot version 3.2.3.stable
in Engine by (87 points)

1 Answer

+1 vote
Best answer

Quite possible.
What error means is that object being signaled lacks method to " hear signal ". Yours name is onrangedweaponattack_started(). I guess You succesfully implemented it in script or didn't change the name of connection default method.
After duplicating it still should be in duplicated script, but maybe something went off. Try to debug this error by connecting things via code, in ready() or init().

by (6,371 points)
selected by

Thank you, connecting in code on ready function fixed it.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.