How do you make text appear if a variable is true


#1

I know how to make a choice show up or not if a variable is true/false, using the *selectable_if or *if command.
I’m just curious to know if there is a command or something to make text appear if a certain variable is true or not.
For example,

You walk into a clothing store.

Then, if (gender = female), the text, “I love pink clothes!” would pop up after that line. Or if (gender = male), the text “I like blue clothes!” would appear after that line.

Does such a command exist? It would really make my life easier, haha.

I’ve checked the Choicescript Help forum, but I couldn’t find anything like what I’m asking.


#2

Yes. Note the spacing.


You walk into a clothing store.

*if gender="female"
    "I love pink clothes."
*if gender="male"
    "I love blue clothes!"

Also read http://choicescriptdev.wikia.com/wiki/If


#3

I tried it out and it works. Thank you so much!:slight_smile:


#4

Just to help you out, there are 3 kinds of variable data types: numeric, string, and boolean.

The choicescript wiki has a page that should explain the differences better, and how to use them, so I’ll just link that right here.

If you need a different explanation feel free to shout out here for help with stuff.


#5

Thank you too, Caddmus. :slight_smile: