I am trying to send a signal on contact with my player and a coin that updates the coin amount. Here is the code for the collision with the player
func onCoinareaentered(area):
if area.isingroup("player"):
hide()
emit_signal("coinget")
I connected the signal coinget to this function
func onCoincoingetn():
coins += 1
$HUD.updatecoins(coins)
It doesn't update the counter, but I tried similar code with a timer instead
func onTestTimertimeout():
coins += 1
$HUD.updatecoins(coins)
and that code worked. Any way how to make it work with the signal?