0 votes
by (160 points)

Hey there, guys! I need to make a really simple thing, but I can't figure it out!

Okay so I have a $location variable, right? 

And my char is in a Kitchen. And he has 3 options


I want to make it so when you go Outside, the $location becomes "Outside".

I tried doing it like this in Harlowe


You are in a kitchen. Where will you go now? 

[[(set: $location to "Outside")Outside]]
[[(set: $location to "Bedroom")Bedroom]]

But it doesn't work ;(
The $location becomes which ever string is the lowest on the screen. So even if I go Outside in this example, the $location will still be "Bedroom"


Also, just to keep myself from flooding the forum - a bonus question. Can I make my code not interfere with the formatting? 

Like if I have a tonn of code before some readable text, when I play my game I need to scroll way down to reach the text. Like the code is still physically occupying space on a page even though it's invisible. 

1 Answer

+1 vote
by (64.2k points)
selected by
Best answer

For your first question, try the following:

(link: "Outside")[(set: $location to "Outside")(goto: "Outside")]
(link: "Bedroom")[(set: $location to "Bedroom")(goto: "Bedroom")]

See: (link:), (set:), and (goto:).


For your second, you want the collapsing whitespace markup.


by (160 points)
Thanks a lot!!! It worked!
by (64.2k points)
If you're satisfied with the answer, please select it.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.