I am trying to make an adventure story but I need an if/else loop to display some text. Code:
(if: $weapon == true) [
Weapon Strength: $weaponstrength
]
@watt274
Because your $weapon variable contains a Boolean value (true/false) you don't need to compare it to true or false in your (if:) macro, you can do the following instead:
(if: $weapon) [The weapon variable has a value of true]
(if: not $weapon) [The weapon variable has a value of false]
@watt274:
I did not include an example of the (else:) macro in my previous comment because @petithobbit included a tutorial video in their's. I also somehow included an invalid space character between the (macro:) and its associated hook, even though the version in my story project does not!
The following example is in case you did not watch the video, and have had the invalid spaces characters removed.
(if: $weapon)[The weapon variable has a value of true]
(else:)[The weapon variable does not have a value of true]
(if: not $weapon)[The weapon variable has a value of false]
Comments
Because your $weapon variable contains a Boolean value (true/false) you don't need to compare it to true or false in your (if:) macro, you can do the following instead:
I did not include an example of the (else:) macro in my previous comment because @petithobbit included a tutorial video in their's. I also somehow included an invalid space character between the (macro:) and its associated hook, even though the version in my story project does not!
The following example is in case you did not watch the video, and have had the invalid spaces characters removed.