First of all I would prefer going into a call, it would be a lot easier for me to explain and a lot quicker, but here is my problem (I am curently in tech Support 1 VC):
I have a Signal "raycast_collided(collision_obj : Object)" that is in the script connected to the node "player_immobile_first_person". It is emited whenever the raycast which is a child of the node hits an object.
this signal is connected to 2 function, there is 1 which is in the same script as the signal, and it runs whenever the signal is emitted perfectly fine, then there is the other function which is in another script connected to another node that doesn't run and I don't understand why.
I tried running get_connections() and it doesn't find the function in the other script, even though Godot shows it is connected to the Signal as shown in the picture. PLEASE HELP!
PS: I have tried making a dummy script connected to a child of "player_immobile_first_person" with a function connected to a signal and it works, but when I tried another dummy script connected to a node that is a sibling to "player_immobile_first_person" it doesn't
here are some code snippets if that helps:
In "player_immobile_first_person" script:
signal raycast_collided(collision_obj : Object)
# more code between
func _process(delta):
if raycast.is_colliding():
var collision_obj = raycast.get_collider().get_name()
raycast_collided.emit(collision_obj)
# more code between
func _on_raycast_collided(collision_obj):
print(collision_obj)
#this succesfully prints the collision_obj
In the other node script:
# some code here
func _on_player_raycast_collided(collision_obj):
print("works")
#this does not print anything