How to get user to enter a password to leave a screen?

helpingtogrowhelpingtogrow Member, PRO Posts: 74

Hi,
I want to have a "home" icon which when pressed at any screen
prompts the user for a password that takes him back to the
menu.
Thanks.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Use the Keyboard Input behavior and check its attribute against a set password.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • helpingtogrowhelpingtogrow Member, PRO Posts: 74

    HI I'm new to GS, could you please elaborate a little on how to do this?
    Thanks so much.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited October 2018

    Sure. Create two text attributes called game.input and game.lastInput.

    When Touch is Pressed
         Keyboard Input [attribute: game.input]

    When attribute game.input is not game.lastInput
         When attribute game.input is "ThePassword"
              Change Scene [menu scene]
         Change attribute game.lastInput to game.input

    Note: The second rule above checks to see if the keyboard input has changed since the last time the actor was clicked/tapped.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • helpingtogrowhelpingtogrow Member, PRO Posts: 74

    I don't understand what value the attribute game.lastInput should be given?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @helpingtogrow said:
    I don't understand what value the attribute game.lastInput should be given?

    Oops, sorry about that! I edited the post above to include the correct behavior.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • helpingtogrowhelpingtogrow Member, PRO Posts: 74

    Hi,
    I have a game with a limited free time with an option to pay to upgrade to the full
    version. Can I list this as free in Google Play or do I have to list it as a paid
    package?
    Thanks.

Sign In or Register to comment.