Howdy, Stranger!

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

Multiple if statements and images help

I'm trying to display a different picture depending on what actions have been taken in the current scene.  The problem is that I'm already using an if statement, so I'm not sure how to do it.  I want there to be two different pictures, one for when the character has a torch, and one for when they don't have it.  Here's what I've got:

<<if $visited_look_well eq "yes">>Guarding the doors are a pair of lit torches, one on either side. 
You could use one to see down the well!
[img[porch no torch]]

[[Open doors|open door]]
[[Torch|get torch]]
[[Back to the courtyard|temple court]]
<<else>>
Guarding the doors are a pair of lit torches, one on either side.
[img[porch no torch]]

[[Open doors|open door]]
[[Back to the courtyard|temple court]]<<endif>>


I need some kind of if statement around the first picture, but I can't figure out how to make it work.  Can anyone point me in the right direction?

Comments

  • If I understand your question correctly, you can just stick another if/else statement in there. Something like:

    <<if $gottorch eq 0>>[img[porch no torch]]<<else>>[img[porch torch]]<<endif>>

    Of course you'll need to set $gottorch to 1 when the player gets it. Hope this helps! :)
  • That won't mess up the else?
  • Nope! You can nest if statements as much as you want.
Sign In or Register to comment.