How do I put a password in a door?

Get help using Construct 2

Post » Tue Mar 14, 2017 5:38 pm

First of all, I'm sorry for my level of English :oops: . My question is, if there is any way to put a password to a door or vault?, thanks in advance.
B
3
Posts: 2
Reputation: 179

Post » Tue Mar 14, 2017 7:15 pm

LucasLG wrote:First of all, I'm sorry for my level of English :oops: . My question is, if there is any way to put a password to a door or vault?, thanks in advance.


Of course there is. But first you have to make it clear what kind of game you're making.

Is is like 100 Doors on Android/iOS where if you tap on a door a small dialogue box would open for your to put the code in?
Is it a PC game where you can enter the code via keyboard input?
Is it a top down game where if your character sprite collides with the door it will allow you to enter you password?

In either case it's just a matter of matching a 'right password' string with another string consisting of each element whatever you've input.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Post » Tue Mar 14, 2017 8:03 pm

MPPlantOfficial wrote:
LucasLG wrote:First of all, I'm sorry for my level of English :oops: . My question is, if there is any way to put a password to a door or vault?, thanks in advance.


Of course there is. But first you have to make it clear what kind of game you're making.

Is is like 100 Doors on Android/iOS where if you tap on a door a small dialogue box would open for your to put the code in?
Is it a PC game where you can enter the code via keyboard input?
Is it a top down game where if your character sprite collides with the door it will allow you to enter you password?

In either case it's just a matter of matching a 'right password' string with another string consisting of each element whatever you've input.



The game will be for android, and the code will have a word which you will have to decipher by putting the letters with an arrow and selecting the letter in each position, at the moment it will only be a door. Thanks again for the reply.
Image
B
3
Posts: 2
Reputation: 179

Post » Tue Mar 14, 2017 9:42 pm

I am assuming you are using sprites for your lock so you will need to determine when each sprite is set to the correct letter.

On spritelock1 animation = "OneRight" add 1 to LockOpen

Do that for each sprite and when LockOpen=6 they have solved the lock and the door opens.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830


Return to How do I....?

Who is online

Users browsing this forum: vzad and 24 guests