0 votes
by (750 points)

Not sure if I am wording properly but how do I set up to make more then 1 variable needed for a if?



<<if $item1 gt 1>><<if $item2 gt 1>><<if item3 gt 1>><<if $item4  gt 1>>[[Unlocks this passage]]<</if>>

2 Answers

+1 vote
by (159k points)

What you are looking for is the and operator listed in the <<if>> macro's documentation.

Your example should look something like the following.

<<if $item1 gt 1 and $item2 gt 1 and item3 gt 1 and $item4 gt 1>>[[Unlocks this passage]]<</if>>

warning: the above example was written from memory and has not been tested, it may contain syntax errors.

+1 vote
by (68.6k points)

Use the logical-AND operator, if the sub-expressions must all be true, or the logical-OR operator, if only one of the sun-expressions must be true.  For example:

<<if $item1 gt 1 and $item2 gt 1>>


by (750 points)
Both Methods work.

didnt know you could just put 'and' to include a extra variable.


Thanks greyelf and TheMadExcile!