How do you code mini games with arrows and choosing correct door?

Hey guys. I need help on how to code a mini game where the character has to choose the correct door. The game is on a timer. If the character chooses the wrong door, game and timer starts all over and a message from the narrator says “Incorrect.” If the character chooses the right door, a message from the narrator says “Correct. Congratulations!”

How do I code this?

Thank you so much!

Are you using tapable overlays? If so:

NARRATOR
You have 5 seconds to choose the right door.
label door_game
tappble [timed:5]
"DOOR1" {
sound wrong_buzz
NARRATOR
|color:red, outline:maroon| Incorrect.
goto door_game
}"DOOR2" {
sound wrong_buzz
NARRATOR
|color:red, outline:maroon| Incorrect.
goto door_game
}"DOOR3" {
sound correct_ding
NARRATOR
|color:green, outline:forestgreen| Correct!
goto door_game_end
}
label door_game_end
NARRATOR
Congratulations, you won the game!

If you’re not using overlays and want to go with choices, just switch the word ‘tapable’ to 'choice :slight_smile: Hope this helps :cherry_blossom:

1 Like

Although I would recommend doing something different than starting over when the reader chooses the wrong door… :thinking: The timing wouldn’t make sense then if they can just start over, you know? Maybe add a label saying “Times’s up! You lost…” or something.

1 Like

Yes that makes sense. I want to use tappables when moving to another background. How do I do that?

The choices would when they pick a door

Next to the word ‘tappable’ you put ‘pan’ and which zones. For example from zone 1 to 3:

tappable [pan:1:3]
"DOOR1" {
...
}
1 Like

Ok thanks I’ll try that :blush:

1 Like

So I forgot one thing. I don’t have tappable arrows and I don’t know where to get them from.

Also, these are the backgrounds I’m using for the mini game:
This is the start background:

This is another background the reader can pan to (left arrow):

One more background the reader can pan to (right arrow):
open door horror hallway 2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.