|Attention||Topic was automatically imported from the old Question2Answer platform.|
Hi. I am having some troubles with getting a signal to connect.
I want to preface by saying I am aware that the naming convention of “sniper.png 22” is not good; I am also aware that I am connecting ‘coin_pickup’ and ‘weapon_pickup’ to the same ‘update_score’ method. I am only using it for testing purposes.
My problem currently is that when I walk over a weapon it should emit a signal called ‘weapon_pickup’. This should then connect to ‘update_score’ when I walk over it. However it does not. This same procedure works with ‘coin_pickup’. At first I believed that when my character walked over a weapon it never detected any signal, however when I swapped out ‘weapon_pickup’ for ‘coin_pickup’ in both the emitting and receiving side under ‘sniper1.png 22’ it worked just as intended. Below are some pictures to further explain my issue. Please let me know if you have any ideas as to why this is not working.
signal is emitted and connected in the same moment ??
Or when are signals connected ?
Inces | 2022-09-11 20:17
Yeah it’s hard to see the problem without the rest of the code. However, if moving over it is not triggering the signal, it could be somewhere else in your logic, like the movement itself. You could also be on a different layer than these objects. It’s hard to tell without more code.
SnapCracklins | 2022-09-12 00:43
thank you for the reply! I found the issue. I simply forgot to type “signal weapon_pickup” at the top of my pickup script lol.
givemeurmelons | 2022-09-12 12:59