Howdy, Stranger!

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

How to make and use items?

I posted this in the twine 1 forum by mistake and got an answer for twine 1 but I understand 2 has a diferent format

I am brand new at this. I would like to have an inventory and for different choices to become available depending on what item you have. Like say you get a choice between picking up a dagger or a cake, later on in the game you encounter an event which will change depending on what item you picked up earlier.

Also, I'm told it's possible to change the story format. How do I do this?

Appreciate your help

Comments

  • It's not so much which version of Twine you're using, but which format.

    You change the format by clicking the up arrow at the bottom left of the grid map screen, and choosing 'Change Story Format'.
  • I'm on Harlowe 1.2
    Someone gave me a code but I get an error message. They said it's because 1.2 is only on Twine 2
  • edited November 2015
    From your previous thread, greyelf gave you a Harlowe-based example after it became clear that you were using Harlowe (he'd previously given you one for the Twine 1 story formats). Did you try that Harlowe example?
  • Each story format defines:
    a. what it's macro syntax (format) will be. eg. <<macro>> vs (macro:) vs <% macro %>
    b. the list of default macros it has.
    c. how the generated HTML and CSS will look and work.
    d. any other features it supports.

    This is why code examples for one story format generally don't work as is for a different story format.
  • From your previous thread, greyelf gave you a Harlowe-based example after it became clear that you were using Harlowe (he'd previously given you one for the Twine 1 story formats). Did you try that Harlowe example?

    I tried it before but it didn't work, you made me realise it's because I removed the brackets so it works now.

    So how would I make it so an option only appears if the person is holding that item?
  • So how would I make it so an option only appears if the person is holding that item?
    You can use an (if:) macro similar to the one in the other example, the following shows a markup link if the reader is holding the dagger:
    (if: $holding is "dagger")[ [[Option you want to show->Target Passage Name]]]
    
    ... note the number of open [ and close ] square brackets, also currently Harlowe has an issue parsing three open [ square brackets in a row so you need to add a single space character between the open [ of the (if:) macro's associated hook and the open [[ of the markup link.
Sign In or Register to comment.