These videos about the best ways to achieve specific game mechanics are very useful, please keep them up!
@brettmakesgames
Жыл бұрын
Thanks, will keep at it!
@brdthechao
3 ай бұрын
bot
@TehNinjaFlute
Ай бұрын
Thanks for this tutorial. I was using change_to_packed_scene before but I decided to update to the call_deferred method. I still wanted to use PackedScenes, though, so I modified the code a bit. Here's how I did it if anyone is interested (so far it works just fine): func switch_scene(pscene: PackedScene) -> void: call_deferred("_deferred_switch_scene", pscene.resource_path) # pscene.resource_path grabs the path to the provided PackedScene and returns a string func _deferred_switch_scene(scene_path: String) -> void: current_scene.free() var new_scene = ResourceLoader.load(scene_path) current_scene = new_scene.instantiate() get_tree().root.add_child(current_scene) get_tree().current_scene = current_scene
@dudemannxs
Жыл бұрын
Thank you for posting this info. Going from Unity to Godot after many years of Unity seems like it would be an easy transition, but it is a totally different way of thinking. I really appreciate your efforts.
@brettmakesgames
Жыл бұрын
You're so welcome! Glad they've been helpful. I've hoped these focused videos would be useful for those who don't want to sit through a long tutorial but instead learn how to do a specific thing.
@Shader_Snake
5 ай бұрын
thank you for the valuable information and for not editing out the mishaps that happen and how you correct hem, I got a free bonus lesson on how to disconnect signals
@MonkiGowst
Жыл бұрын
These tutorial videos are pure gold! please keep making them, Brett! :)) I love that you include the debugging as well, it's super instructive to see how you troubleshoot when something comes up.
@brettmakesgames
Жыл бұрын
Thanks, Monki! I appreciate the feedback, it's really validating!
@atomixfang
3 ай бұрын
Quick and simple for what I needed. Thanks a lot!
@JayFolipurba
7 ай бұрын
I think this is what I need? Creating a script that handles the scene switching outside is what I would go with because it reminds me of the game manager scripts I learned to do in unity. Also, for my application I have a lot of scenes with lots of buttons that do the same or similar things, ie redirecting back to the main screen or redirecting back one in the hierarchy and it makes sense to be able to do that from the outside. But I'm still learning and only have a shaky grasp on gdscript at best
@jugibur2117
Жыл бұрын
Thanks for sharing! Like to see a more advanced version with fading and perhaps a loading button :-)
@brettmakesgames
Жыл бұрын
Great suggestions, thanks! I'm planning to do a more advanced one with loading screens, so I can include that too.
@hsha89196
11 ай бұрын
Thank you for showing me how to change scene using coding.
@a.aspden
Жыл бұрын
Your videos are helping me a lot! Thanks man!
@Betegfos
9 ай бұрын
Nice tutorial, I am working on a 3d game that has larger maps. Could you make a video on background loading as well?
@marshallr.8121
11 ай бұрын
exactly what i was looking for, straight to the point, much appreciated!
@successspotu
Жыл бұрын
How to i transfer objects in current scene to another scene how to do it in godot 4 or if drop object and move to next scene and come back how to save that object position or which type object this?
@brettmakesgames
Жыл бұрын
Hey, Spotu! Yeah, that's a big topic. I'd love to cover it in a future video. The gist of how you'd go about this is by either storing the position in a global constant or in a save file on your computer. Then when you load up the scene with that object in it, check its position and place it accordingly.
@successspotu
Жыл бұрын
@@brettmakesgames if the multiple object there how to relocate my holding object in previous scene
@brettmakesgames
Жыл бұрын
@@successspotu Not quite sure I'm following what you're asking. Mind sharing more about the system here and what you're wanting it to do?
@successspotu
Жыл бұрын
@@brettmakesgames if i have a gun with 2 ammo in current scene move to next scene i wand to same gun and ammo in my player
@brettmakesgames
Жыл бұрын
@@successspotu Thanks, that helps! I'd keep track of the ammo count and current weapon in an Autoload Singleton and then use that for the UI and when firing. I cover that in the 2D Platformer video on how to keep track of collectibles across levels: kzitem.info/news/bejne/p4R7p36pq6tmpnY
@Mangamaskinen
5 ай бұрын
When I reset a scene and then switch scenes I get an error because current_scene turns into null. I cant see to get it to act properly. Do you have any solution to this that uses the SceneSwitcher? Good video though!
@productionsinparadise2880
6 ай бұрын
What about changing scenes when the player walks through a door or something like that?
@xZSHORAx
3 ай бұрын
Instead of using a button, you could set up a collider on the door that runs the same method as shown in the video :))
@BenitoBeni1414
10 ай бұрын
Im making a platformer and when you fall to the void it goes to a you died scene but then i can’t get it to switch to the previus scene because i have more than 1 level
@jikkermanccini
9 ай бұрын
Not sure if you'll see this, but I have a question. I'm trying to make a player character that can swap between different forms on command, and thought a scene tree would be the best method to do this. How do I make sure the newly loaded form is in the same position & has the same velocity as the previous form?
@wav372
Жыл бұрын
Why your functions have specified return type from default? Great video by the way.
@thricemindblown7883
9 ай бұрын
Loves me some best practice. TY.
@ritzenhauf
7 ай бұрын
looking for info on scene transitions now...
@szybkidarek55
Жыл бұрын
when i try to run a scene i get this error Invalid call. Nonexistent function 'instantiate' in base 'GDScript'. :(
@szybkidarek55
Жыл бұрын
after i ctrl+c ctrl+v your code and followed the video again it started working
@SphinxKingStone
4 ай бұрын
Thanks a lot
@FixedVenus
7 ай бұрын
Thanks man now i know how to restart a whole game if this video never exist i have to write a long code from reseting (+1 Subcribe)
@NOPerative
10 ай бұрын
Good stuff.
@kubustv_0101
2 ай бұрын
don't working
@farshadfaemiyi5540
Жыл бұрын
Godot 4 درست است
@danielalvesldiniz
7 ай бұрын
wow, very good! I think the Godot oficial documentation could emphasize like "look, the 2 SceneTree.change_scene_to_*" methods destroy your old scene. if you want to preserve it to reuse it later, do it like this: (...)"
Пікірлер: 40