Is this the correct format for Flags/Gains

I’m new to flags and gains. I’m making a test story to make sure it works. I’m doing a mystery story and want the player to collect clues, and then be able to look at the clues at the end. I’m using this tutorial. I’m making one character collect 4 clues (clue1, clue2, clue3, and clue4). How do I code the rest of the game and how to remember the clues the player found? Here’s the code:

   ROSE (talk_pointup_happy)
Let's start!

choice
“Go left” {

@ROSE faces left AND ROSE exits left

INT. OPEN APARTMENT DOOR - DAY
@ROSE enters from right to screen center
@ROSE faces left

gain left

}
“Go right” {

@ROSE exits right

INT. LA APARTMENT - DAY
@ROSE enters from left to screen center
@ROSE faces right

gain right

}

label clue1_and_2

ROSE (think_rubchin)
(What do I do now?)

choice
“Look up” {

gain look_up

}
“Look down” {

gain look_down

}

if (look_up) {

@ROSE is jump_happy_loop

    ROSE (flirt_wink_atcamera)
I found clue1!

} else {

@ROSE is transition_stand_to_squat_neutral

    ROSE (flirt_wink_atcamera)
I found clue2!

}

    ROSE (talk_think_neutral)
Am I done?

choice
“I’m done” {

}
“I still need to look” {

goto clue1_and_2

}

Thanks for any help!

It has to be the same as the word even capitals, Give that a try

If that doesn’t work there is another way to do it without gains
so you would Name the choice below, and remove the gains
choice (DIRECTIONS)
“Go left” {

@ROSE faces left AND ROSE exits left

INT. OPEN APARTMENT DOOR - DAY
@ROSE enters from right to screen center
@ROSE faces left

}
“Go right” {

@ROSE exits right

INT. LA APARTMENT - DAY
@ROSE enters from left to screen center
@ROSE faces right
}
When you get the next bit you put
if (DIRECTIONS is “go left”) {

} else {

}

Hi - does the code make any error or it is not working as you have expected? Or what kind of help exactly do you need?:thinking::smiley:

Hi, I believe I understand now what you want…But seems to me you have their unnecessary gains and if/elif/else

I guess you do not need somewhere later in the story to remember she went up or dow…if so you will better go with levels and not gains.

I guess you need for future reference only gain clue 1 -4 right?

If so this might be what you are looking for - its not 100% copying your script I just have played with the possibility to look left and right and on each side to look up and down:

EXT. CAIRO STREET - DAY
@cut to zone 2
@DAMIEN stands screen center
@DAMIEN is think_rubchin
DAMIEN (talk_pointup_happy)
Let’s start!
choice
“Go left”
{
@follow DAMIEN to screen center in zone 1 in 3 AND DAMIEN walks to screen center in zone 1 in 3
goto clue1_and_2
}
“Go right”
{
@follow DAMIEN to screen center in zone 3 in 3 AND DAMIEN walks to screen center in zone 3 in 3
goto clue3_and_4
}
label clue1_and_2
DAMIEN (think_rubchin)
(What do we have here?)
choice
“look up”
{
NARR
Here goes scene looking up
Oh I found Clue No. 1!
gain clue1
goto clue1_and_2
}
“lookd down”
{
NARR
Here goes scene looking up
Oh I found Clue No. 2!
gain clue2
goto clue1_and_2
}
“I am done looking here for clues”
{
DAMIEN (talk_think_neutral)
Have I really found everything here?
choice
“No let me look again”
{
goto clue1_and_2
}
“Yes”
{
@follow DAMIEN to screen center in zone 2 in 3 AND DAMIEN walks to screen center in zone 2 in 3
goto merge_clue
}
}
label clue3_and_4
DAMIEN (think_rubchin)
(What do we have here?)
choice
“look up”
{
NARR
Here goes scene looking up
Oh I found Clue No. 3!
gain clue3
goto clue3_and_4
}
“lookd down”
{
NARR
Here goes scene looking up
Oh I found Clue No. 4!
gain clue4
goto clue3_and_4
}
“I am done looking here for clues”
{
DAMIEN (talk_think_neutral)
Have I really found everything here?
choice
“No let me look again”
{
goto clue3_and_4
}
“Yes”
{
@follow DAMIEN to screen center in zone 2 in 3 AND DAMIEN walks to screen center in zone 2 in 3
goto merge_clue
}
}
label merge_clue

    NARR
What do you want to do now?

choice
“Go left”
{
@follow DAMIEN to screen center in zone 1 in 3 AND DAMIEN walks to screen center in zone 1 in 3
goto clue1_and_2
}
“Go right”
{
@follow DAMIEN to screen center in zone 3 in 3 AND DAMIEN walks to screen center in zone 3 in 3
goto clue3_and_4
}
“I have searched all”
{
DAMIEN (talk_think_neutral)
Have I really found everything here?
choice
“No let me look again”
{
goto merge_clue
}
“Yes”
{
goto end_clue
}
}

label end_clue

    NARR
Here goes the story on

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