- Home /
How to open a door after a numerical password?
I already have my game, it is for iOS, but for the last level I have a door, and I would like that this door could only be open after the user touch the right number sequence, for example 1,2,3,4,5. How can I do it?
Answer by Berenger · Feb 08, 2013 at 08:16 AM
First, you have to consider separately the two tasks "Opening the door" and "Checking the password". The first one is apparently not what matters here.
Once the player understands he's to type a password (a GUI window telling him so, with a character appearing each time he presses a key maybe ?) you have to listen for each key input. If it's a letter, concatenates it into the result string. Once the correct number of character is reach, or if the user pressed enter / a button, check if the result matches the password. If it does, open the door.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to make a time mission 1 Answer
Implementing Game Center 2 Answers
Game Launcher Image. 1 Answer
Slicing Objects 1 Answer