Text as variable?

can I use text as variable?
*create “magic”
*if (variable > 30)
*set Magic “Elemental”
*if (variable < 30)
*set Magic “Caotic”

So, on the stats I got:

Magic: Elemental/Caotic/Etc depending on wich one you got
text Magic

so insted of using the if (variable > 30) I can use if magic “elemental” or something like that?

You use magic.
*if magic elemental
Light blinds you.
*goto outcome1
*if magic caos
*goto outcome2
*if magic x
You die
*goto_scene death

Now i’m getting this

RANDOMTEST FAILED: Error: Day1 line 150: Invalid expression at char 29, expected OPERATOR, was: STRING [“Mythological Creatures”]

You’d want to create it as:
*create magic ""

Also, when testing it, you’d use:
*if magic = "Elemental"
(i.e. have an = if you’re testing for things being equal, have " around all text variables, and make sure to keep the capital letters if you had them the first time, since "Elemental" is not the same as "elemental".)

If you want more help, there’s a useful list of links here:


Thank you!
It worked :slight_smile: