Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

If nesting headache! (Sugarcube 2.11.0)

$
0
0
Can't work out what I'm doing wrong here. As the player clicks each item in the Storage Hut they're taken to a passage which says '(item) taken)' then a timer returns them to the Storage Hut passage and the the descriptions should be different (depending on which item they took).

This is the code, which works perfectly until they return to the hut having taken both items, at which point I want a 'Hut is empty' message, but I get the whole list of alternatives printed at once!
<<if not $hasCans and not $hasShells>>
Clearly it's been used for storage and half a dozen [[cans of assorted food]] remain. On a lower shelf a small [[box of shells]] for a handgun are lieing in the dust.

The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

<<if $hasCans>>On a lower shelf a small [[box of shells]] for a handgun are lieing in the dust.
The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

<<if $hasShells>>Half a dozen [[cans of assorted food]] food sit on the shelves.
The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

<<if $hasCans and $hasShells>>The storage hut is empty.

The main [[entrance|housedoor]] to the house is a short dash across open ground.<</if>>

Viewing all articles
Browse latest Browse all 1844

Trending Articles