Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to I use $value > n, $value < n, to show only the option it applies to?

I am using twine 2, or the online version, How do I make it so that when I want this to happen.
$value < 5 only option 2 appears and is select-able.


  • edited November 2015
    You need to state which story format you are using, as answers can be different for each one. I am going to assume you are using Harlowe, which is the default.

    You can use the (if:) and (else:) macros to control what gets displayed to the Reader.
    note: I add indentation and line-breaks to make the example more readable, you can remove them.
    (set: $value to 4)
    (if: $value < 5)[
    	[[Option 2->Target Passage Name]]
    	[[Option 1->Target Passage Name]]
    	[[Option 2->Target Passage Name]]
    	[[Option 3->Target Passage Name]]
    ... changing the $value to 5 will display three options.

    note: Posting a question a second time half an hour later does not get it answered any faster.
Sign In or Register to comment.