Alternate Text

I want to write text options that can change more than once without having to write a bunch of if/either/or variables. What I’m getting at is in a given room description or any other block of text we can do things like [if unvisited] for rooms or [one of] [or] [stopping] which seems to only alter the text from its original wording or create objects that a player can have or not have or be in the same location with or set any number of conditions to govern the output.

Is it possible to alter text output in-line multiple times without creating a large nested set of conditions as we would to determine the outcome of various actions. I am trying to do something like this (I know first time, second time, etc. does not work, just an example)

[if first time]some text here[if second time]some text here[if third time]some text here

or

[if some condition]some text here[if some other condition]some text here[if yet another condition]some more text

With the two examples here I am mostly wondering if the multiple if conditions can be imbedded directly or do they need to be nested out.

I am able to work out complex ways of displaying what I want but just wondering if someone has come up with a simple way to alter the text in a single block over a period of several interactions without using a table or dummy variables.

Yep. Study the documentation: §5.7. Text with random alternatives

Random untested examples:

Say "The leaves are [one of]brown[or]orange[or]gold[or]falling[cycling]." Say "The leaves are [one of]brown[or]orange[or]gold[or]falling[at random]." Say "The leaves are [one of]brown[or]orange[or]gold[or]falling[as decreasingly likely outcomes]." Say "[one of]The game show host spins the wheel...[or]The wheel continues to spin...[or]The wheel slows down...[or]...the wheel comes to rest on the number 7! You win a million dollars![or]Confetti begins to pour down as the audience goes wild![or]More confetti continues to pour down...[stopping]" Say "[if dining room is visited]It's the same boring old dining room.[otherwise]This dining room is new and interesting![end if]" Say "[if the number of things on bed is more than 3]Your bed is a cluttered mess of [a list of things on bed][otherwise if the number of things on bed is more than 0]Your bed is relatively de-cluttered, with only [a list of things on bed] on it[otherwise]Your bed is immaculately made, with nothing on it[end if]."

For your first example, would not “[one of]first time[or]second time[or]third time[or]any time after that[stopping]” be suitable? If you do not want default text to be displayed after all the options have been chosen, you can end with “…[or][stopping]” (with no text in between).

For your second, you can “chain” conditionals with “[if A]text[else if B]other text[else if C]more text[else]default[end if]”, but you cannot nest them without writing it out in the standard colon-indentation (or begin-end) syntax.

Thank you all for your help.