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!
@Bargeral2 ай бұрын
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.
@zongopbongoАй бұрын
it should ensure the signal is disconnected when queue_free-ing which is nice!
@Boblikescheese3 ай бұрын
Phenomenal tutorial, exactly what I was looking for when handling signals with dynamically loaded objects! Very informative and straight to the point
@EidoEndy3 ай бұрын
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.
@donaldedgarvisuals3 ай бұрын
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!
@autumnshade843 ай бұрын
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!
@brandonstone27542 ай бұрын
This guy needs more likes/subs this was great
@Games-vu9nz2 ай бұрын
Thank you for the beautiful and useful explanation.
@ThaAftrPartie4 ай бұрын
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
@mikefrom19744 ай бұрын
Good callout, thanks!
@grymmjack2 ай бұрын
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?
@WouterLockefeer2 ай бұрын
Yes and yes. Autoloads extend Node by default, so no need to worry about that.
@avinsxd5 ай бұрын
This is a great tutorial! Very underrated
@huachimingoX2 ай бұрын
thanks you explained very well
@igork13363 ай бұрын
very good tutorial
@MrGramno5 ай бұрын
Very interesting video i learned about the on scene enter and exit signals :D
@simonsaysgray3 ай бұрын
thanks, great video!
@deniskkd62623 ай бұрын
You are awesome🎉
@Notreal764 ай бұрын
Thank you for this tutorial
@chiubaca3 ай бұрын
Any downsides to this approach or suggestions when this is a bad idea ?
@MathGoOli3 ай бұрын
I've linked the bombs on the basic level scene that all level scenes inherits.
@nvm91744 ай бұрын
thank you man
@EidoEndy3 ай бұрын
Quick question, why do you need to disconnect the signal when leaving the tree? Is the listener still in memory or something?
@mikefrom19743 ай бұрын
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.
@mbg4681Ай бұрын
*_Axe Squirrel!!!!_* *guitarsolo*
@Ocdib3 ай бұрын
Hi! Just checking on the _on_tree_exiting signal... Is this signal triggered when the object `queue_free`s? What's its purpose?
@mikefrom19743 ай бұрын
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
@Ocdib3 ай бұрын
@@mikefrom1974 I see. Is there any consequence of leaving a signal attached AFTER queue_free? What are we safe guarding against?