This is what I want (Sugarcube syntax):
<<if $oven[5]>><<301>><<else>><<35>><<endif>>
where 301 and 35 are passage titles, where I need to go depending on the $oven[5] value.
The resulting html DOES what I want, BUT displays it as if there were an error! It says: "This passage does not exist: " and then shows correctly the "non-existing" passage, all on pink background. How to fix this? (Surely I can write <<if $oven[5]>>
301<<else>>
35<<endif>>, but this is ugly.)
Comments
...the others are..
As you're in sugarcube, you have a goto macro, so you could use a ninja link -
Then at the start of 35:
...but that's Spagetti code and messes the visual links in the editor up.
Also, <<goto>> is not recognizes (No macro or passage called "goto"). I downloaded sugarcube-2 archive and unzipped it to Twine folder, keeping the names intact - what else should I do to make it work?
If <<goto>> wasn't recognized, then you were/are probably using Sugarcane (one of the Twine 1 vanilla story formats), not SugarCube (1 or 2).
If you've placed the SugarCube 2 install in the correct place (the sugarcube-2 directory from the archive goes in the targets directory). All you need to do is set it as your project's story format (Story menu > Story Format > Sugarcube-2). After doing so, mykael's second suggestion and both of greyelf's suggestions should work (so should mykael's third, but don't do that, it's daft).
If you're not afraid of a little JavaScript, you could also use the conditional/ternary operator to shorten it, like so (though, it only works for two values):
That said, while I certainly don't recommend the vanilla story formats, to get mykael's second suggestion working in them, you'd use the following instead: (does not work in SugarCube)
Is there any way to make a delay for N seconds in this format? I guess it requires JavaScript, but how exactly to do it?