Howdy, Stranger!

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

Twine Expressions

edited February 2016 in Help! with 1.x
Hi, I've been doing Twine for a few months. And I guess I'm still new. I have a real hard time understanding CSS, I don't know if it's just how my brain works or if it is really that confusing. I have been downloading and importing other people's games into my Twine engine, going through their maps, to learn but it still doesn't help much.

So I want to do this:

Björn is a

Optimist
Realist
Pessimist

Something similar to this would be Porpentine's class system in Ruiness where you have to choose if you're a scavenger or a dustrunner. I want to use the cycling link and have the player choose what he wants to be and then go on a route associated with that choice. So that means there will be three endings. Although, this isn't an RPG, just a three route story, I really hope this all makes sense.

So what expression do I use? A Choice one like in the Dan Cox video:
But it doesn't look like Sugarcube.

or the If ones?

The one in Porpentine's Ruiness is like this:

I'm a...

<<if $zealot is 0 and $haruspex is 0>><<cyclinglink $class "scavenger" "dustrunner">><<endif>><<if $zealot is 1 and $haruspex is 0>><<cyclinglink $class "zealot" "scavenger" "dustrunner">><<endif>><<if $zealot is 1 and $haruspex is 1>><<cyclinglink $class "haruspex" "zealot" "scavenger" "dustrunner">><<endif>><<if $zealot is 0 and $haruspex is 1>><<cyclinglink $class "haruspex" "scavenger" "dustrunner">><<endif>>

amend

I hope this question makes sense.

Comments

  • XianXian wrote: »
    […] I want to use the cycling link and have the player choose what he wants to be and then go on a route associated with that choice. So that means there will be three endings. Although, this isn't an RPG, just a three route story, I really hope this all makes sense.

    So what expression do I use? […]
    Unless you're wedded to the idea of using a cycling link (e.g. for stylistic purposes), why not simply use three links? For example:
    Björn is: [[an Optimist|Optimist]], [[a Realist|Realist]], or [[a Pessimist|Pessimist]].
    
    Each link will send the player to one of the three passages in question (i.e. Optimist, Realist, or Pessimist), which starts the associated route. It's literally, the simplest thing you could do, which does what you want.

    Alternatively, you could use three setter links, each going to the same follow-on passage, but setting a $variable to different values. For example:
    Björn is: \
    [[an Optimist|Next PC Choice][$class to "optimist"]], \
    [[a Realist|Next PC Choice][$class to "realist"]], or \
    [[a Pessimist|Next PC Choice][$class to "pessimist"]].
    

    Alternatively, you could use the <<choice>> macro, as in the video. It, however, is more for situations where the player is allowed to revisit the choice passage, which you're unlikely to be doing here.

    Alternatively, you could use the same <<cyclinglink>> macro used in Ruiness. Though the end result would be essentially the same as using the three setter link method I just described, so only go this route if you really want that style. Also, if you do, you need to use the correct version of the macro for the story format you end up using.

    Depending on the story format you're using, there are likely several other ways to do this as well.

    XianXian wrote: »
    […] in the Dan Cox video: […] But it doesn't look like Sugarcube.
    It's not. The story format used in that video was Jonah.
  • I think I will just keep it simple and put down all three choices without the cycling link. I just wanted to be fancy but I guess I can't do that yet. I tried to do it the way you mentioned, but I'm not sure what "Next PC Choice" means.
  • It's just the next passage after the one where you do the class choice. Name it what you want.

    That should have been obvious from the link markup. Since it wasn't, spending some time with the documentation would probably be beneficial.
  • As suggested by TheMadExile, reading at least the following four sections of the Twine 1 Wiki should help:

    a. Twine Index
    b. Twine Reference
    c. Getting Started with Twine 1.x
    d. Tips and Tricks
  • I'm sorry. How do I mark this as answered?
  • If you used the Ask a Question button to create this thread then there should be a Answer (or words to that effect) button, but if you used the New Discussion button to create the thread then you can't.
  • Shiz, it was my first time posting here, but I do lurk a lot.
Sign In or Register to comment.