Incredible video! I'm learning godot and this video gave me so much information I needed about making a main menu / level select. Loading scenes, connecting scenes, class names and exports - so much good info for learners!! ty
If you get the error, 'Identifier "Functions" not declared...' replace "Functions.load_screen_to_scene..." with use the same code used to load the level select from world select (but adapt it to the levels), *or* follow this tutorial to get the "Functions" script: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-n0HXRToIZBc.html
Hey, @aaamott I don't suppose you have the code for this adaptation at all do you? I'm looking into it now and I'm struggling a bit with this particular code adaptation. :) Thank you.
@@Azzavhar I have it somewhere, but I've changed it quite a bit. If you follow the tutorial I linked though and write the Functions script, then save it where it says to in that tutorial but in this project, your code should work!
@@aaamott Gotcha 👌 I'll go create a 'functions' script then as you suggest and as the other video suggest. ✅ If that'll do the trick then I'll go bash out that script. Thank you for your help. 😁 👍
Wonderful tutorial and exactly what I was looking for, the only thing I think I'm doing wrong is this line in the level_select script: Functions.load_screen_to_scene(current_level.next_scene_path) It gives out this error, not quite sure why: Parse Error: Identifier "Functions" not declared in the current scope.
I appreciate the feedback! That particular line was just to demonstrate how you could load a scene using a loading screen and is not necessary code. The loading screen tutorial explains that logic more, if you are interested in implementing something like that. Otherwise, you should be able to omit that code and just use the get_tree().change_scene_to_file() function, if I remembered it correctly. Let me know what you find - I can provide more help tomorrow as needed. Not trying to promote this as a shameless plug, but here's the loading screen tutorial I made for reference: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-n0HXRToIZBc.html
Certainly! There's no promise that I will get it out soon, though, as I have quite a bit of a backlog to work through. In the meantime, what you can do is add some metadata to your level list (such as a number of collectables you need to unlock), and then in the _ready function of that level tile, lock that level if the condition is not met yet. Then, in the code that handles moving the player icon, check if the destination level is locked first before letting the icon move toward it. Hope this helps!
Hello! The Code was running well until 9:40 when it gave me an error on the code "Functions.load_screen_to_scene(current_level.next_scene_path)". The error was "Parse Error: Identifier "Functions" not declared in the current scope.". I don't know what to do. Can you help? :(
These may be your potential issues: 1) Did you remember to add Functions to your AutoLoad scripts? Go to the Project Settings, and you should be able to add it via the AutoLoad tab. 2) Alternatively, you should be able to make load_screen_to_scene a static function and it should allow you to call it in other scripts without adding it as an AutoLoad script. Let me know if you have any further questions!
I got stuck in the same place for a minute. The author didn't show the "Functions" script in this video, but in another. He says it quickly, but you can use the same code used to load the level select to load a level scene. He just *also* has a video showing how to make a loading screen that uses a Functions script with a load_screen_to_scene function. @codernunk I would recommend you add a link to the video in the description since you can't edit the video. Gonna go paste this as replies to the other comments mentioning the issue and leave a main comment in case someone else comes looking.
May you share with me what error you are seeing? I believe most of it should work, but I'm curious to see what the issue is exactly so I can help solve it. Thanks!
I'm guessing your error was something to do with "Functions" and if so, I got stuck in the same place for a minute. The author didn't show the "Functions" script in this video, but in another. He says it quickly, but you can use the same code used to load the level select to load a level scene. He just *also* has a video showing how to make a loading screen that uses a Functions script with a load_screen_to_scene function. Gonna go paste this as replies to the other comments mentioning the issue and leave a main comment in case someone else comes looking.