Howdy, Stranger!

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

Problems with either() Function

Hey there. I'm working on a silly little game in Twine, and I've come to a passage where I'd like for the next passage to be randomized from three [at the moment] choices.

Here's the code I'm working with:
With a great burst of light, [[a hand emerges from the circle...|either("Bird","Space","Hell")]]
However, it doesn't seem to be working, despite being from the official wiki. I've made all of the passages listed, but it still won't connect. Here's a screenshot of my current setup as well. The passage labeled 4 should be connected to Bird, Space, and Hell.

Any idea what's wrong?

Comments

  • I don't use the standalone Twine setup, so this is only a guess, but I suspect the use of either might be throwing off the passage linker inside Twine. The links should work in the compiled story, but the arrows  just might not show up in the passage display.

    Of course, I might be wrong and the links could be completely broken, but that exact line of code worked for me in a test, so it should just be a graphical glitch rather than broken code.
  • I can verify that this code also worked perfect for me. You have passages already created labelled Hell, Bird, and Space, correct? If Twine is missing the passage, it will literally take you to temp/either('Bird','Space','Hell') which is no bueno.

    What exactly is happening? Is it just that the arrows aren't showing up?
  • Aha! It seems to have worked itself out when I rewrote the passages themselves, oddly enough. :-0 I guess it didn't like the text the first time? Either way, thank you both! It's working perfectly now. c:
    I can't wait to be done with it so I can release it onto the forums, hehe~ Shouldn't be long now, with that glitch ironed out.
Sign In or Register to comment.