Unlock And Lock Lock Button

Discussion in 'How Can I...?' started by Quim, Jun 1, 2020.

  1. Quim

    Quim Boxer

    Joined:
    Mar 28, 2020
    Messages:
    2
    Likes Received:
    0
    Hello folks!

    I really need this feature in code... How can I unlock/lock Lock Button programmatically?
    My game starts with a level selector. Each level is Lock Button, after clicking on it user is being redirected to the chosen world/scene, and the button is locked. Sometimes I need to unlock the previously locked button from code. Let's say that you have to watch an ad or pay to try again.
     
  2. Blackbird Games Studio

    Blackbird Games Studio Boxer

    Joined:
    Jan 15, 2019
    Messages:
    81
    Likes Received:
    31
    Hi Quim,

    Please check if this video explains what you need:

     
  3. Quim

    Quim Boxer

    Joined:
    Mar 28, 2020
    Messages:
    2
    Likes Received:
    0
    Thank you Blackbird Games Studio for responding.

    This is not at all my case. I want to let a player play each level only once. If they click on Lock Button it should remain close. But in special cases, a player can earn the possibility to play again chosen level. There is no control over Lock Buttons from code. If you lock a button once you can never unlock it programmatically. This is also a big issue when a player locks the button and then shuts down the game. After restarting the application, it will remain locked.

    My use case is as follow:
    1. Player starts game
    2. Player hit start button - he/she will see a level selector UI
    3. The first level is opened when the app is used for the first time
    4. When a player starts the first level it Lock Button for this level will be locked (player can play each level only once)
    5. When a player finishes Level 1, there will be UI shown with a button which will unlock the next level (in this case Level 2)

    Issue: When a player will shut down the application, between steps 4 and 5, they can't play anymore because all levels are locked.

    I have no control over those buttons to unlock them when the user starts the application again. I have all information stored in Settings about which level has been completed, but it's useless because there is a missing API to unlock/lock Lock Button programmatically.


    Thank you for your time.
    -- Q
     

Share This Page