Howdy, Stranger!

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

How to modify text based on where a player's been

Okay, this is probably the noobiest question ever asked on a forum. I apologize for that.

Basically, I'm trying to write my first story. I want certain options to show up or not show up based on what a player has seen and done. I've tried every command in the book for that; if, set, visited, all that jazz. However, no matter what I do, I can't get it to work. Either the text always shows up whether the player has done the thing they need to do it to get it to show up or not, or it doesn't show up at all. I just want to know what I need to do to get it to work, because all of my searching on the wiki hasn't done crap for me so far. Thanks.

Comments

  • Hey - Noob leading the Noob here, but are you looking for the History macro? - Harlowe's guide says:

    (history:): This returns an array of strings. The strings are the names of every passage the player has visited, in order. You can use this array in the following ways:
    to find out the previous passage the player visited was, use (history:)'s last.
    To find out if the player ever visited a passage named "Lighthouse", use (history:) contains "Lighthouse".
    Note: this macro may change in future versions of Harlowe to return more complex datamaps instead of just strings, providing more information about that passage.

    Any use?
  • Holy hell, you are my savior. I was going off the wiki, which is barely updated for Trine 2, but looking at that document made me realize how this all works. I cannot thank you enough.
  • No problem. Very happy to have gotten something right!
  • Alright, now for a second question...

    How do I set it so text shows up if a player HASN'T been somewhere? I tried using the 'not' command, but it just causes the text to not show up no matter what.
  • When using both the not and contains operators at the same time you need to pay attention to your parentheses, try the following:

    (if: not ((history:) contains "Some Passage"))[You have not seen the Some Passage Yet!]
Sign In or Register to comment.