GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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

helpingtogrowhelpingtogrow Posts: 60Member, PRO

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 Posts: 11,524Member, Sous Chef, PRO, Senior Sous-Chef

    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 Posts: 60Member, PRO

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

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

    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 Posts: 60Member, PRO

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

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

    @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 Posts: 60Member, PRO

    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.