Need help with tappable minigame

Hii, I’m wanting to make a mini game where you look around a store for supplies.

I don’t want them to be able to collect everything though, how would I make it so that they can only pick up 3/6 items instead of being able to pick them all up? Thankyou.

Use one of your characters to keep track.
Before the tappable set the charactor to 0.

@COUNT =0

After the player has tapped an option and before you loop them back to the begining of the tappable section, add this.

@COUNT +1
if (COUNT = 3){
goto end_tappable
}

COUNT is the name of the charactor, end_tappable is the label, change them to whatever you’re using.

1 Like

I’ve added the gain points but it’s not ending the game, it just carries on letting the player search even though they have the 3/6 items that they can pick up.

label mini_game1
tappable [pan:1:3]
“FLASH.LIGHT” {

NARRATOR
You have selected a flash light!
Would you like to take this item?
choice
“Yes.”{

NARRATOR
You have a gained a flash light.
@ALEC +1
gain FLASHLIGHT
@overlay FLASH.LIGHT clear
@pause for 0.1
if (ALEC=3){
goto end_minigame
}else{
goto mini_game1

}}“No.”{
NARRATOR
Keep searching!
@pause for 0.1
goto mini_game1
}
}
“MATCHES”{
NARRATOR
You have selected a box of matches!
Would you like to take this item?
choice
“Yes.”{
@ALEC +1
gain MATCHES
NARRATOR
You have gained a box of matches.
@pause for 0.1
@overlay MATCHES clear
if (ALEC=3){
goto end_minigame
}else{
goto mini_game1
}
}“No.”{
NARRATOR
Keep searching!
@pause for 0.1
goto mini_game1
}}
“RED.FOLDEDBLANKET” {

NARRATOR
You have selected a blanket.
Would you like to take this item?
choice
“Yes.”{

NARRATOR
You have gained a blanket.
@ALEC +1
gain BLANKET
@overlay RED.FOLDEDBLANKET clear
@pause for 0.1
if (ALEC=3){
goto end_minigame
}else{
goto mini_game1

}}“No.”{
NARRATOR
Keep searching!
@pause for 0.1
goto mini_game1
}
}
label end_minigame
LILY
Think we have enough now

I didn’t try this in my script, so you need to run it by yourself, by try this?

label mini_game1
if (ALEC=3) {
goto  end_minigame
}
else {
tappable [pan:1:3]
"FLASH.LIGHT" {
NARRATOR
You have selected a flash light!
Would you like to take this item? choice
"Yes."{
NARRATOR
You have a gained a flash light.
@ALEC +1
gain FLASHLIGHT
@overlay FLASH.LIGHT clear
@pause for 0.1
}"No."{
NARRATOR
Keep searching!
@pause for 0.1
goto mini_game1
}
}
"MATCHES"{
NARRATOR
You have selected a box of matches!
Would you like to take this item?
choice 
"Yes."{
@ALEC +1
gain MATCHES
NARRATOR
You have gained a box of matches.
@pause for 0.1
@overlay MATCHES clear
}
"No."{
NARRATOR
Keep searching!
@pause for 0.1
goto mini_game1
}
}
"RED.FOLDEDBLANKET"{
NARRATOR
You have selected a blanket.
Would you like to take this item?
choice 
"Yes."{
NARRATOR
You have gained a blanket.
@ALEC +1
gain BLANKET
@overlay RED.FOLDEDBLANKET clear
@pause for 0.1
}
"No."{
NARRATOR
Keep searching!
@pause for 0.1
goto mini_game1
}
}
}



 label end_minigame
LILY
Think we have enough now
 
 
 
 
 
 
1 Like

Did you put “@ALEC =0” before “label mini_game1”?

On the web previewer, go to Story Modifiers and then Character Points, that will show you what number ALEC is currently set to.

He’s at 0, he never gains any points up until now

I’m about to go to work but i’ll try this when I get home and see if it works!

You could also add an elif in between to make sure the if/else command doesn’t mess up your point accumulation:

if (ALEC=3){
goto end_minigame
}elif (ALEC>3){
goto end_minigame
}else{
goto mini_game1
}
etc

2 Likes

They should add that before they get into the minigame but not before the tappable code.

1 Like

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