![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | tomandrieu |
Hello,
I’m trying to create a level selector scene where level are represent by buttons, a path2D and a clic on a button allows the player to navigate on the map.
But i want to make a lock/unlock sort of level selector. If the level is locked the button is disable and not show. When you succeed a level, the next level (button) appears and it’s clickable.
In my design i have some levels who can unlock multiple level (like from a city you can go to mountain level or ocean level so there is 2 way).
I have 2 solution :
Make trigger so when a level is win i define a method in each level to tell wich level is now unlocked.
Or i make a more generic solution who detect the nearest buttons on the way.
I have a solution where an entity, after a victory is going to follow the path2D in every direction from the position i’m at. If it detect an unlock button it stops, if it detect a locked buttons it unlocked it and stop and i will “fire” entity to like all the direction on my map.
I think this will works but i know it’s not the best solution and i’m not so familiar with godot objects.
I don’t know if you can create child in a path2D and interact easily with those in a script or no ?
Your help is really helpful and if you have any questions to clarify the subject (english is not my first language :/) let me know.
Have a great day !