How do we code to hide texts or images from the status stage and reveal once we reach to this certain choice or passage?
You can do that easily by setting a variable and wrapping the text you want to hide or show in an if statement.
On the passage or choice that triggers the hidden text:
<<set $variable to true>>
On the passage where you want to hide text:
<<if $variable is true>>Your hidden text here.<</if>>
If you have alternative text or images you want to display when the the hidden text is hidden, you can do this:
<<if $variable is true>>Your hidden text here.<<else>>Alternative text here.<</if>>
(2) from coding in hiding, how can we hide or change the text once we reach to this certain paragraph or choice? Thank you for your time.
If you want to show different text when the player meets certain requirements, you can also do that with an if statement. If you have two variations, you can use a boolean (true/false), like in the example above). If you have more than two variations, you could use integers (numbers), with each number being assigned a different version of the display text.
For example, in your status screen, or wherever you want your display text to be:
<<if $variable is 1>>Text/Image Version 1
<<elseif $variable is 2>>Text/Image Version 2
<<elseif $variable is 3>>Text/Image Version 3
<<elseif $variable is 4>>Text/Image Version 4.<</if>>
And in your game, when the player makes the right choice or visits the right passage, you would set $variable to whatever number corresponds to the version of the text you want to display.
<<set $variable to 1>>
You could also use strings instead of integers:
<<if $variable is "Version A">>Text/Image Version A
<<elseif $variable is "Version B">>Text/Image Version B
<<elseif $variable is "Version C">>Text/Image Version C
<<elseif $variable is "Version D">>Text/Image Version D.<</if>>
Hope that helps!














