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

How to hide links if a variable = 2

$
0
0
I know that i should use an if statement (macro), but i'm confused because i'm new to Twine and the programming language, i'm used to some C# and PHP so here's my code:

The main(The Shortcut) passage:
[[Hogtie him and leave him|Hogtie]]
[[snap his neck|Snap 2]]
[[Check his Pockets|Get Keys 2]]
(if: $sctimes is 2)[Open The Vent]

Hogtie passage:
[[Back|The Shortcut]]
(if: $sctimes is 1)[(set: $sctimes to 2)]

Snap 2 passage:
[[Back|The Shortcut]]
(if: $sctimes is 1)[(set: $sctimes to 2)]

Get Keys 2 passage:
[[Back|The Shortcut]]
(set: $sctimes to 1)

So, what i want is to hide all the links(Hogtie, Snap 2, Get Keys 2) in the main(The Shortcut) passage if the $sctimes = 2 and create a new passage called "Open The Vent"

Viewing all articles
Browse latest Browse all 1844

Trending Articles