Howdy, Stranger!

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

Statement with "(If: $value1 is false OR $value2 is false)"

Hello everyone !

I'm completely new to Twine. I tried a first simple story, but then of course I wanted to complicate it a bit, and that's when everything went wrong :)

Here's my problem : I created a story with 3 rooms to look into. The player has to go into the 3 rooms or into 2 specific one of them to continue with the journey. Let's call the rooms $room1, $room2 and $room3.

So basically :
- The player goes to $room1 and $room2 (or $room2 and $room1) then $room3 --> He follows the journey
- Or he can go to $room3 first, then $room1 and $room2 (or $room2 and $room1) and at this point he is forced to go back to $room3 again to continue (a text "come back to $room3" appears when this is the path chosen).

What I want Twine to understand is this :
If the player went to $room1 <b>OR</b> $room2 when he gets to $room3, then a specific text appears <b>AND</b> he can visit [[room1]] if that's the room he didn't go into, <b>OR</b> [[room2]] if that's the other one.

I thought this could work :
(if: $room1 is false or $room2 is false)[Specific text]
(if: $room1 is false)[ [[Go to room1]] ]
(elseif : $room2 is false)[ [[Go to room2]] ]

But it doesn't work... I'm wondering if this can be linked to the fact that there is a lot of different conditions according to the path the player chooses ?

Cause there are 3 possible ways :
(If: $room1 is true <b>OR</b> $room2 is false)[specific text 1]
(If: $room1 is true <b>AND</b> $room2 is true) [specific text 1 + <b>[[New path]]</b> ]
(if : $room1 is true AND $room2 is true <b>AND</b> $room3 is true] [specific text 2 + [[New path]] ]

I'm sorry if I don't explain very well ! I'd really, REALLY appreciate if you could give me your ideas about how to make it work ! Thanks a lot !!! :D


Comments

  • Please use the code tag when posting examples - it's the C on the editor bar.

    When asking a question you need to state the name and version of the Story Format you are using, as answer can be different for each one. Based on the syntax of your examples I know you are using a version of Harlowe but without more information I can't guess which one so I will assume it is v1.2.3, which is the default for Twine 2.1.0

    If I understand your question correctly you are saying the following:

    a. The link to the 'new path' only appears in Room 2 if all three rooms have been visited.

    b. If Room 3 is the second room visited then you want to show a link to the room (1 or 2) that has not been visited yet.

    c. If Room 3 is the first room visited then whichever room (1 or 2) is visited second should show a link to the room (1 or 2) that have not been visited yet.

    d. If Room 1 or 2 is the third room visited you want to show a link to Room 3.

    The following five passage example should do what you want:

    1. Your startup tagged passage.
    (set: $room1 to false)
    (set: $room2 to false)
    (set: $room3 to false)
    
    2. The first passage of your story.
    [[Room 1]]
    [[Room 2]]
    [[Room 3]]
    
    3. The Room 1 passage.
    (set: $room1 to true)\
    \
    [[Back to Start->Start]]
    
    (if: $room2)[Some text... [[Go to Room 3->Room 3]]]\
    (else-if: $room3 and not $room2)[Some text... [[Go to Room 2->Room 2]]]\
    (else:)[Specific text]
    
    4. The Room 2 passage.
    (set: $room2 to true)\
    \
    [[Back to Start->Start]]
    
    (if: $room1)[Some text... [[Go to Room 3->Room 3]]]\
    (else-if: $room3 and not $room1)[Some text... [[Go to Room 1->Room 1]]]\
    (else:)[Specific text]
    
    5. The Room 3 passage.
    (set: $room3 to true)\
    \
    [[Back to Start->Start]]
    
    (if: $room1 and $room2)[Some text... [[Contine the Journey->Next]]]\
    (else-if: $room1)[Some text... [[Go to Room 2->Room 2]]]\
    (else-if: $room2)[Some text... [[Go to Room 1->Room 1]]]\
    (else:)[Specific text]
    
  • Hello,

    Indeed I'm using Harlowe on Twine 2.1.0, and I'll keep in mind that I need to use the C bar !

    Thanks a lot !! It was really helpfull and it worked :smiley:
Sign In or Register to comment.