This is almost perfect for me but the canvas layer is 'blocking clicks' and interactions with the scene... trying to figure out how to work around this.
Tbh, you need to be more explicit about where you're moving your mouse and where you're clicking. Instead you're just kind of going there so I have to look around, rewind multiple times and ask myself "wait.... where are they going?"
When I instanced the scene, it caused all my buttons to stop functioning entirely. And I mean buttons as in nodes the keys on my keyboard work fine. Anyone know why?
I just found the solution => Change the layer level of your TransitionScreen node to something like -100 by default, and change it to 100 when you start the transition (otherwhise your effect stay behind)
Yeah it's a little bit hard to explain in a youtube comment but I'll try. The general idea is to have a function where you pass the next scene you want to start. In that function, you set a local variable to that scene and then you start the transition screen. In the signal callback function for the transition screen finishing, you set the scene using the reference that you set in the first function. The end result would be something like this: var next_scene = null func set_scene(scene): $TransitionScreen.start_transitioning() next_scene = scene func _on_TransitionScreen_faded_to_black(): for child in $CurrentScene.get_children(): child.queue_free() $CurrentScene.add_child(next_scene.instance()) Edit: I should add that you'll want this to be the Main scene and make it a singleton (Autoload) so that any scene can call Main.set_scene(load("res:my/next/scene.tscn"))
That's how I did it, it works great. func set_UI(uiscene : PackedScene) : screen_fader.play("to_dark") #GDScriptFunctionState yield(object: Object = null, signal: String = "") yield(screen_fader, "animation_finished") for child in ui_control.get_children() : child.queue_free() var new_ui = uiscene.instance() new_ui.init() ui_control.add_child(new_ui) screen_fader.play("to_normal")
this video is great but i have a question. I made an Rpg game whitch switches between scenes but if i go back to a scene it relodes everytink as it was but i don`t want it to so could you show us how to do this ?
hi, i have a little problem, when i want to start the game, the transition start and i don't press any key. But the transition works when i press a key.
Are you calling transition() in the _ready() function of TransitionScreen? Also make sure that the autostart toggle isn't selected in the AnimationPlayer for any of the animations. It's the little toggle arrow thing next to the animation name.
The only clear tutorial on youtube
Thanks!
Very concise tutorial. Im a unity developer trying out Godot and its been a good experience. Thank you for making this.
Man, you are so fast for everything hahaha... You deserve a sub for that!
Great tutorial! You helped me a lot, thanks!
I love this bite syzed tutos. To the point, no need to ramble about anything else. I... I LOVE YOU!
Nice tutorial worth a subscribe !
This is almost perfect for me but the canvas layer is 'blocking clicks' and interactions with the scene... trying to figure out how to work around this.
Set the Mouse settings (on the right, in the inspector side) from Pass to Ignore on all control nodes in the new canvas layer
@@jontopielski6227 Perfect, thank you.
@@jontopielski6227 thx !!
wow this was fast i almost missed how you recorded the keyframes tbh
Also, the code is really small. It's hard to read sometimes. Zoom of some sort would've been helpful.
Tbh, you need to be more explicit about where you're moving your mouse and where you're clicking. Instead you're just kind of going there so I have to look around, rewind multiple times and ask myself "wait.... where are they going?"
When I instanced the scene, it caused all my buttons to stop functioning entirely. And I mean buttons as in nodes the keys on my keyboard work fine. Anyone know why?
I have the same problem
I just found the solution => Change the layer level of your TransitionScreen node to something like -100 by default, and change it to 100 when you start the transition (otherwhise your effect stay behind)
@@poupi3300 thxxx but how to rechange in layer 100 ?
There is many things in Godot that are too hard to figure out the method without tutorials.
Hey! I loved your video. Is there a way to do it with more scenes?
Yeah it's a little bit hard to explain in a youtube comment but I'll try. The general idea is to have a function where you pass the next scene you want to start. In that function, you set a local variable to that scene and then you start the transition screen. In the signal callback function for the transition screen finishing, you set the scene using the reference that you set in the first function. The end result would be something like this:
var next_scene = null
func set_scene(scene):
$TransitionScreen.start_transitioning()
next_scene = scene
func _on_TransitionScreen_faded_to_black():
for child in $CurrentScene.get_children():
child.queue_free()
$CurrentScene.add_child(next_scene.instance())
Edit: I should add that you'll want this to be the Main scene and make it a singleton (Autoload) so that any scene can call Main.set_scene(load("res:my/next/scene.tscn"))
@@jontopielski6227 Thank you! I actually found other way to do it but this is better xD
Thanks a lot
Can we use yield instead connecting signals?
Sry if it's too dumb I'm learning btw
That's how I did it, it works great.
func set_UI(uiscene : PackedScene) :
screen_fader.play("to_dark")
#GDScriptFunctionState yield(object: Object = null, signal: String = "")
yield(screen_fader, "animation_finished")
for child in ui_control.get_children() :
child.queue_free()
var new_ui = uiscene.instance()
new_ui.init()
ui_control.add_child(new_ui)
screen_fader.play("to_normal")
this video is great but i have a question. I made an Rpg game whitch switches between scenes but if i go back to a scene it relodes everytink as it was but i don`t want it to so could you show us how to do this ?
what do i do if i want to add a transition on an already made scene do I put that scene into a container? sorry il mew to godot
Thank you!!
fade_in, fade_out.
Very helpful :)
assert didnt work on release, idk why
when i instance the TransitionScreen.tscn in my game it fills the screen with black
Right click the node , click editable children . Then click on the Rect node and make it transparent.
@@geeksinsuits worked thanks
damn I wish I was this good at coding, trying to learn but I'm just too damn stupid haha
Otherwise, the tutorial was helpful, but yea those improvement would help alot imo
Is this tutorial applicable to Godot 4?
4:41
For Godot 4, it's now instantiate() to start the 2nd scene.
Thnx
great
Nice 👍🏻
thx
thanks but you were really fast
hi, i have a little problem, when i want to start the game, the transition start and i don't press any key. But the transition works when i press a key.
Are you calling transition() in the _ready() function of TransitionScreen? Also make sure that the autostart toggle isn't selected in the AnimationPlayer for any of the animations. It's the little toggle arrow thing next to the animation name.
@@jontopielski6227 thanks you
@@jontopielski6227 This didn't work for me :(
Tutorial too fast, doesn't work and it broke my game
Sorry but your cursor moves too fast for my eyes and I can barely see what your typing because of the size even with my glasses