<h1>This is the beginning of my story.</h1>
I want the readers to be able to make choices : for exemple, choose between several reactions, which will have consequences after that in the narrative. Or choose between several characters, that will not react the same way accross the story.
Let's try that.
In my story, you can choose to be :
[[Ruby : fire power]]
[[Lapis Lazuli : water power]]
[[Pearl : wind power]](set: $heroine to "Ruby")
Ruby is fierce
[[Go on]](set: $heroine to "Lapis Lazuli")
Lapis Lazuli is calm
[[Go on]](set: $heroine to "Pearl")
Pearl is joyful
[[Go on]]You chose $heroine
//**How do I know that ?**//
I created a variable, I called **''$ heroine''** (without a blank between $ and heroine)
When I asked you to choose a character, I set the variable regarding the passage you chose, using
** ''set :'' ''$ heroine'' to '' "Name" ''
Of course I write Ruby, Lapis Lazuli or Pearl, instead of "Name" depending the passage.
Now, everytime I use **''$ heroine''**, the name you selected appears.
And [[there is more]]Using that variable, allows me to print in the same passage pieces of text depending the chosen character .
Ruby is fierce, Lapis Lazuli is calm and Pearl is joyful. So they must have different reactions if something happens.
Let's figure that. A monster attacks.
**(if: $heroine is "Ruby")[All the sudden, Ruby spitted fire and destroyed the monster.] (if: $heroine is "Lapis Lazuli")[Lapis Lazuli took a deep breath, and started fighting.] (if: $heroine is "Pearl")[Pearl looks at the monster, and then burst out laughing as the monster was so clumsy.]**
As you chose **$heroine**, you can only see what happens to her.
But I actually wrote
**(if : $ heroine is "Ruby")[ All the sudden, Ruby spitted fire and destroyed the monster. ] (if : $ heroine is "Lapis Lazuli")[Lapis Lazuli took a deep breath, and started fighting.] (if : $ heroine is "Pearl")[Pearl looks at the monster, and then burst out laughing as the monster was so clumsy.]** (without blanks)
I print only the chosen text with the macro **if**, that make text appear under conditions
Pretty cool uh?