# How do you make text appear if a variable is true

**URL:** <https://forum.choiceofgames.com/t/how-do-you-make-text-appear-if-a-variable-is-true/1893>\
**Category:** ChoiceScript Help\
**Created:** [November 19, 2013, 10:54pm UTC](https://forum.choiceofgames.com/t/how-do-you-make-text-appear-if-a-variable-is-true/1893 "2013-11-19T22:54:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mystjerne](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/mystjerne/32/16217_2.png) [@Mystjerne](https://forum.choiceofgames.com/u/Mystjerne)\
**Post date:** [November 19, 2013, 10:54pm UTC](https://forum.choiceofgames.com/t/how-do-you-make-text-appear-if-a-variable-is-true/1893/1 "2013-11-19T22:54:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [November 19, 2013, 10:57pm UTC](https://forum.choiceofgames.com/t/how-do-you-make-text-appear-if-a-variable-is-true/1893/2 "2013-11-19T22:57:17Z")

</div>

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](http://choicescriptdev.wikia.com/wiki/If)

---

<div class="post-metadata">

**Author:** ![Mystjerne](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/mystjerne/32/16217_2.png) [@Mystjerne](https://forum.choiceofgames.com/u/Mystjerne)\
**Post date:** [November 19, 2013, 11:46pm UTC](https://forum.choiceofgames.com/t/how-do-you-make-text-appear-if-a-variable-is-true/1893/3 "2013-11-19T23:46:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Caddmuss](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/caddmuss/32/424_2.png) [@Caddmuss](https://forum.choiceofgames.com/u/Caddmuss)\
**Post date:** [November 20, 2013, 1:52am UTC](https://forum.choiceofgames.com/t/how-do-you-make-text-appear-if-a-variable-is-true/1893/4 "2013-11-20T01:52:51Z")

</div>

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.](http://choicescriptdev.wikia.com/wiki/Data_types)

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

---

<div class="post-metadata">

**Author:** ![Mystjerne](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/mystjerne/32/16217_2.png) [@Mystjerne](https://forum.choiceofgames.com/u/Mystjerne)\
**Post date:** [November 21, 2013, 6:19am UTC](https://forum.choiceofgames.com/t/how-do-you-make-text-appear-if-a-variable-is-true/1893/5 "2013-11-21T06:19:48Z")

</div>

Thank you too, Caddmus. 🙂
