I've always connected to signals via the ready() function, and never bothered to disconnect them. Using the tree enter and exit is much cleaner, thanks for that tidbit.
What a glorious solution! I was having such a hard time understanding connecting signals in Godot and dreading the task, but now i see how simple it really is! This video should be linked in the documentation page for signals!
Amazing tutorial. Global signals are something I’ve been trying to wrap my head around for a while (for making a bullet hell). and this does a good job explaining it.
This was just what I was looking for! Thank you! I’ve been using an auto load with getters and setters which is working fine, but this will work a treat!
Thank you so much for making this! Super helpful and only one I could find that deals with dynamically loading objects. Update: watching this finally fixed a problem Ive been trying to resolve for a week of setting Z_Index of multiple instances of objects so that whatever the last clicked object was is on Z_Index 1 and everything else sets Z_Index to 0. Thank you!
4:51 it’s not random, it’s based on the scene save. So if you save a scene from within the script menu, and say are on a different script, that script you’re writing’s scene now becomes the original script’s scenes’s thumbnail. Just go into the editor and re-save the scene with the area you want shown
Great video thank you! Also explained the Singleton thing. So we need to extend Node for our autoload Singleton? Does the autoload automatically get loaded in EVERY scene then?
To prevent a value going above the array length, clampi(value, 0, array.size() - 1), using clampf if using float To wrap it around: value = (value + 1) % array.size() or if it's a float value = fmod((value + 1.0) , float(array.size()))
This signal is triggered whenever the object leaves the "tree" (the hierarchy representing the currently running level). It's a way to ensure something is done BEFORE a node is gotten rid of, including queue_free
I've always connected to signals via the ready() function, and never bothered to disconnect them. Using the tree enter and exit is much cleaner, thanks for that tidbit.
it should ensure the signal is disconnected when queue_free-ing which is nice!
YOU'RE A WIZARD BARGERAL! What's a ready? Function? Signal? Come back to hogwarts
What a glorious solution! I was having such a hard time understanding connecting signals in Godot and dreading the task, but now i see how simple it really is! This video should be linked in the documentation page for signals!
Phenomenal tutorial, exactly what I was looking for when handling signals with dynamically loaded objects! Very informative and straight to the point
Amazing tutorial. Global signals are something I’ve been trying to wrap my head around for a while (for making a bullet hell). and this does a good job explaining it.
This was just what I was looking for! Thank you! I’ve been using an auto load with getters and setters which is working fine, but this will work a treat!
Thank you so much for making this! Super helpful and only one I could find that deals with dynamically loading objects. Update: watching this finally fixed a problem Ive been trying to resolve for a week of setting Z_Index of multiple instances of objects so that whatever the last clicked object was is on Z_Index 1 and everything else sets Z_Index to 0. Thank you!
amazing explanation. i stumbled upon a video on this topic and it hurt my brain. this one is super nice
This guy needs more likes/subs this was great
Thank you for the beautiful and useful explanation.
This is a great tutorial! Very underrated
Thanks, This is just what I was needing.
4:51 it’s not random, it’s based on the scene save. So if you save a scene from within the script menu, and say are on a different script, that script you’re writing’s scene now becomes the original script’s scenes’s thumbnail.
Just go into the editor and re-save the scene with the area you want shown
Good callout, thanks!
Great video thank you! Also explained the Singleton thing. So we need to extend Node for our autoload Singleton? Does the autoload automatically get loaded in EVERY scene then?
Yes and yes. Autoloads extend Node by default, so no need to worry about that.
Very interesting video i learned about the on scene enter and exit signals :D
I would love to see a tutorial like this, but for a whole game!
thanks you explained very well
thanks, great video!
very good tutorial
You are awesome🎉
Any downsides to this approach or suggestions when this is a bad idea ?
To prevent a value going above the array length,
clampi(value, 0, array.size() - 1), using clampf if using float
To wrap it around:
value = (value + 1) % array.size()
or if it's a float
value = fmod((value + 1.0) , float(array.size()))
Thank you for this tutorial
Hi! Just checking on the _on_tree_exiting signal... Is this signal triggered when the object `queue_free`s? What's its purpose?
This signal is triggered whenever the object leaves the "tree" (the hierarchy representing the currently running level). It's a way to ensure something is done BEFORE a node is gotten rid of, including queue_free
@@mikefrom1974 I see. Is there any consequence of leaving a signal attached AFTER queue_free? What are we safe guarding against?
Quick question, why do you need to disconnect the signal when leaving the tree? Is the listener still in memory or something?
This is just a safety net to prevent weirdness and null errors if a node is no longer in the tree but somehow not completely gone form memory.
What if the squirrel's hand gets bitten off by a lemur?
thank you man
I've linked the bombs on the basic level scene that all level scenes inherits.
Dude ty
*_Axe Squirrel!!!!_* *guitarsolo*
noice video