Hello,
im trying to learn how to use godot and im creating a simple game where objects move right to left and the player has to dodge them.
The moving object can detect collisions via the _on_body_entered(body: Node2D) function, as my print statement correctly works.
However when i emit a signal called "hit" within that function and connect it to my player node, any print statements dont work which leaves me to believe that my signal isnt being received correctly.
I have been connecting the signal through the signal tab.
I have tried using movingobject.connect("hit", _on_moving_object_hit),
ive tried resetting the connection multiple times under new names.
i have tried connecting the _on_body_entered function directly to my player.
None of these worked and im having a hard time finding a solution online.
I have included some screenshots of my scripts, connections and game.
Does anyone know why my connection isnt being received correctly? or is there a better way i could be implementing a collision signal?
My goal is to send a signal when there is a collision to stop movement and give the user an opportunity to restart the game.
Any input is greatly appreciated as ive been stuck on this for a couple hours and its becoming quite frustrating.
Thanks