Question: Can I use if variables within text?


#1

I’m having trouble with… Is it possible to use variables within a block of text?
I want the conversation to be slightly different depending on which character you’re playing.

The error I’m getting is:… invalid expression, couldn’t extract another token

My code looks like this:

#Say “You know… stuck in a creepy house.”
          The twins burst out laughing.

          *if (jack) Apparently, they think you're kidding.

I get that I could just make 2 identical choices, one for if jack, one else; then have them go to two slightly different versions of the conversation before rejoining the main stream.

Maybe I’m using the wrong command?

TL;DR How do I change part of a text block with variables?

Thank you. Sorry if it’s already answered, I did a cursory search and couldn’t find anything.


#2
*if Jack
    Apparently, they think you're kidding.

This should work. Basically, it needs to be on the next line, and indented.


#3

You can do this

#Say “You know… stuck in a creepy house.”
          The twins burst out laughing.

          *if (jack)
                    Apparently, they think you're kidding.
          *else
                    hblahbalbalakajalah

#4

Thank you! That worked perfectly.
@Szaal
@UmbraLamia
:hugs:


#6

If ever want something inline (inside the choice option) you can also use multi replace:

#Say, you're a @{is_police cop|robber}, right?

#7
#Jack and Jill went up the hill to fetch a pail of @{is_drunk water|booze}.