Howdy, Stranger!

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

How to stop passage code from running

Hello! I haven't been using Twine very long so apologies if I mess something up. In Harlowe, I'm trying to have it so that a random number generator goes off at the start of the passage and if it hits, it'll throw the reader into a different passage. I know about the command (go-to:), however it doesn't seem to stop the rest of the 1st passage's code from running (unlike what it says in the description). Here's an example:
{(set: $chance to (random: 1,4))
(if: $chance is 1)[(go-to: "jamie")]
(set: $shower to 1)

With this, the reader get's put onto the $jamie passage, but $shower still gets set to 1. If this is a bug, is there still a way I can stop the passage code from running? Any help is greatly appreciated!

Comments

  • edited March 2016
    Put the (set:) within the hook of an (else:) to accompany the (if:). For example:
    (if: $chance is 1)[(go-to: "jamie")]
    (else:)[(set: $shower to 1)]
    
Sign In or Register to comment.