![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | dion.cq |
Does anybody know why this error is happening:
E 0:00:05.712 emit_signal: Error calling method from signal
‘timeout’: ‘KinematicBody(Player.gd)::recoil’: Method expected 1
arguments, but called with 0… <C++ Source> core/object.cpp:1242 @
emit_signal()
This is the code which is probably the problem:
func weapon_functions(delta):
# Call recoil every time the shoot animation is played
var timer = Timer.new()
if player_shooting == true:
timer.set_wait_time(current_weapon_recoil_time)
timer.set_one_shot(false)
timer.connect("timeout", self, "recoil")
add_child(timer)
timer.start()
else:
timer.stop()
recoil(delta)
Is the code suppose to be this?
func recoil(delta):
pass
Ertain | 2022-10-07 17:35