Help to locks buttons

Hello guys ....
I design game contain 10 levels may i help me to locks buttons in levels in order to the player open it sequential first level1 and when finish it open the second level and etc ....like this pic hqdefault

Welcome

Interesting app. To get specific advice, please share your code.

What does 'lock buttons' mean to you ? Create logic to prevent access to a button until certain things happen perhaps. We don't know what. To control the logic, use 'conditional statements' ... see Programming Your App to Make Decisions for example code.

To create a screen that looks like what you displayed, you either need 14 buttons with images or 14 clickable images or 14 Image Sprites on a Canvas or something similar method to create the display and display what happens.. If a level has been achieved, the image in a 'button' should change if you use buttons (requires switching between two images)..

To disable a button (make it non-responsive); use the set Button.Enabled to false; to enable the button, set Button.Enabled to true might be what you are asking about. Doing that with Enabled will 'lock' or 'unlock' buttons in your graphic display. To make your game work, provide the logic to determine when a button should be locked or unlocked (if ... then ... else type logic).

If you want specific advice, share your Project or an example and explain what you need to do.

There is no tutorial that explains how to build your game.

1 Like

Use button.enabled to false to disable the buttons

1 Like

Thanks for reply
this code , I still not finish yet .
I have 4 levels at this time when the player find five numbers then go to the next level and so on . Therefore i want locks the levels until finish every level
Test.aia (396.1 KB)

There is an alternative to the method I mentioned earlier. Instead of just disabling the buttons you could use if/else statements S oeven if the person tries to open the they will receive a notifier message

1 Like

thanks for reply
I know disabling the buttons , but how can check if the player is finish this level or not because i have multi screens . and how can save the progress of the game when the player is exit and back again .

Use Tiny DB to store the values. I will upload the blocks tomorrow morning.

1 Like

Thanks brother

Here are the blocks I told you about. Use Either of the buttons to make it. Sorry, for you will have to take the time to separate the blocks for doing it.

1 Like