Help my writing partner and I code an if/elif code!

So, my writing partner(@Allie_Diamond_Epy) and I are writing this scene where we have a timed choice:

(More code is being adding to the choices currently)

ANNA

NARRATOR (ANNA)
How should I respond?
choice [timed:5]
“Stay silent and be furious!” {
ANNA
(I want to scream about the problem, but that would make me look like a drama queen!)
@ANNA is idle_argument_angry
NARRATOR (ANNA)
I want to scream at her like there is no tomorrow! That girl need to pay!

NARRATOR (ANNA)
But, I shouldn’t!
@ANNA is deepbreath
} “Address that there is a problem!” {
ANNA
Yes!

ANNA (talk_armscrossed_angry-loop)
Yes, there’s an issue!

ELI (talk_think_neutral)
What is it?
@ELI is think_rubchin

ANNA
This girl thinks it’s wise to try and mess with me.

ANNA
And tried to use her minions to scare me.

ANNA
AND TOLD THEM TO PUT THEIR HANDS ON ME!
}

But after we finish the “Stay silent and be furious” choice we want the system to go back to the choice and lock it. So how would we do this?

Tag:
@JemU776

3 Likes

I think you could create a label where the choice is locked and make the reader go to it after choosing.

2 Likes

There could be an easier way, though.

1 Like

Two choices, both about equal in terms of ease. Choose whichever one feels most natural to ya. :+1:

Label method, like Jillian described

NARR (ANNA)
How should I respond?
choice [timed:5]
“Silent”{

#scene

goto try_again

}“Address”{

#scene

goto continue_story
}

label try_again

NARR (ANNA)
How should I respond?
choice [timed:5]
< LOCKED>“Silent”{

goto try_again

}“Address”{

#scene

}

label continue_story

#rest of the story here

Nested if-else method - In short, have an if-else and a gain to know whether the character has seen that choice before

Note: I bolded the outer layer.

label anna_response

if (second_try){
NARR (ANNA)
How should I respond?
choice [timed:5]
< LOCKED>“Silent”{

goto anna_response

}“Address”{

#scene

}
}else{
NARR (ANNA)
How should I respond?
choice [timed:5]
“Silent”{

#scene

gain second_try
goto anna_response

}“Address”{

#scene

}
}

2 Likes

Thank you! @Scarlet_Sapphire and @episodelillian! @Allie_Diamond_Epy and I will use one of these methods.

2 Likes

Btw, a note about locked choices: the “locked” part of a locked choice is just a colour, it alone doesn’t stop the reader from clicking or anything. That’s why, inside the locked option, there needs to be only 1 thing in it: a goto leading back to just above the choice.

Idk if you knew but just making sure. :+1:

Happy writing! :grin:

1 Like

Thank you!

1 Like

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