Howdy, Stranger!

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

How do i configure choices

I'm not sure if this is the right question but i have a guy who can pick a gun, sword,or dagger. So lets say someone chooses gun how can i make that there choice instead of having to put
gun
[dagger]] etc every time there is a choice involving there weapon? so if they pick gun off table they have that gun and dont need to keep choosing it. thanks

Comments

  • Whenever asking a question, you need to state which story format you're using. The answer depends on the story format. Harlowe is the default story format for Twine 2.

    Assuming you're using Harlowe, you would use a conditional branch like so:
    Choose a weapon: 
    
    (if: $playerHasGun)[]
    (else:)[ [[gun]] ]
    (if: $playerHasKnife)[]
    (else:)[ [[knife]] ]
    

    The variables $playerHasGun and $playerHasKnife need to both be set to "false" before reaching the passage in my example, and set to "true" after picking up the weapon.

    There's a bit more to actually getting it to work, so I included an HTML file which you can import into Twine 2 to look at the code.

    Hope that helps.
  • i was and thank you so much from now i will put what format if i have any other questions i will post them and then put the link here so maybe you can help me in the future
  • I'll be happy to help in the future! :-)
  • IM still a little confused did you put this in one of the passages?.
  • mcfreddie wrote: »
    IM still a little confused did you put this in one of the passages?.
    Did you import my HTML file and look at the code?
Sign In or Register to comment.