i then have this in a diffrent scene the $world is current there but is a varient of diffrent things. world is autoloaded rn and i have tried world. but still nothing
func itday():
$damageable.health / 2
func itnight():
emit_signal(“jumpleft”)
$damageable.health * 2
i then have this in the same script. the jump left is to test if it goes through and it doesnt
idk whats going wrong i have spent a total of 5 hours trialing and resurching but idk.
It is difficult to help because your code snippets are so incomplete. In which script are you trying to connect your signals? Where are you declaring your signals?
signal turnedday
When I get stuck like this I create a test scene in a test folder. In that test folder I try to create a minimum code example of what I am trying to do. Here you seem to be trying to create a signal and connect to it from a singleton called ‘World’. You could do that in just a few lines. Once it is working in the test folder, you can then follow your implementation through in your actual game code and compare them. Usually doing this process reveals the source of the problem.
Not specific I know, sorry, but I hope it helps.
PS Stepping through your code using the editor tools is pretty powerful too. Or use some print statements to say “signal sent” or “signal received” in relevant parts. This can help debug quickly too.
yea i tried the debuging methods before but i couldnt pin point the issue but the tip with issolation folder helped and i managed to get it. to be clear i didnt firgure out how to do the original things but i found an alternate way that isnt too much worse. illl look into the main thing in an folder more later. thanks
Do you use a signal manager? (Some people call it a Signal Bus). Just an autoload that contains all your signals. Since I started using one keeping track of signals has become so much easier for me.