Godot 4.4 how to make Level System like in platformer games

How do i make a Level system like 5 Doors in small 2d area Each Door has around lets say 5 levels u can interact with them to send u to Level UI or menu u chose from and u must complete Level 1 to unlock one after it until u finish first door then second door unlock?

You could do it in any number of ways.
Perhaps a pop up menu with five buttons, instantiated when you enter a door. Each button representing a stage that you will switch scene to if you press it.
Have each button be interactable or not depending on if the stage before it is marked as completed in a global script.

Nice idea i like it thanks

I noticed a few things the other day, when doing a menu.
If you spawn one in when pressing e.g. start, then you will automatically press start on the button that auto-grabs focus (if you have one).
You could switch control schemes i guess, so that pressing start will not auto-press first button the same frame it appears.
But you could also call grab_focus() deferred, to avoid the same “start”-press from being used twice. You could also flush the input buffer or make your buttons check for unhandled input but this feels simpler and works without issues so far.
Just two extra words compared to normal!

$VBoxContainer/Button_continue.call_deferred("grab_focus")

Also, if you want to pause the game while the menu is open you can do so by get_tree().paused = true but in that case your menu will not work as normal. They will also be paused. You can easily solve this in the inspector or by adding a line in ready():

process_mode = Node.PROCESS_MODE_WHEN_PAUSED

But if you want to use tweens for animations in the menu scenes - they will typically exist outside of the node with the while paused process mode. It will not automatically inherit the process mode from wherever it is created. Instead, you can create a tween as below for it to work as normal:

var tween = get_tree().create_tween().set_pause_mode(Tween.TWEEN_PAUSE_PROCESS)

Thanks for tips :smiley: