Howdy, Stranger!

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

Probably a pretty basic question about previously visited passages

So I'm extremely new to Twine and have found myself with a small problem to work out. I'm trying to set a function that reports a message back to the player only if they most recently visited a particular passage (let's call it Passage A)and if a certain function is set to "no". The function is actually only set to no if the player has visited Passage A at some point. So far, If the function is set to no, it will always spit back the response, no matter how long ago Passage A was visited, when I only want the response displayed if Passage A was the LAST passage visited. I've tried a few different things, and I know that the fix must be simple, but I haven't had any luck yet.

I'm working under a deadline, so speedy help would be greatly appreciated! Those interested can take a look at my current build attached--the problem is with coming into the "Hallway" passage.

Comments

  • There's a few ways to go about this, the simplest would probably be to set a variable to 1 in passage A, and set it back to 0 in all visitable passages linked from there, after checking the variable and if appropriate printing your text.

    I can't look at your file right now, do you know how to do what I described above?

    To check two variables at once it's:
    <<if $whatever eq 1 and $otherone eq 1>>
  • I don't have access to Twine right now, and I think my reply is similar if not the same as what mostly useless is saying.

    Use setter links from Passage A to set the variable when the player follows the links from Passage A.
    ::Passage A::

    You gotta get outta Passage A, and quick!

    [[Go to the bedroom][set $fr_PsgA=1]]
    [[Crash through the window][set $fr_PsgA=1]]
    [[Upload yourself to the Matrix][set $fr_PsgA=1]]
  • That did it! Thanks folks, looks like I got it fixed. Really appreciate the assist.
Sign In or Register to comment.