Hi,
I work with Twine 2.1.1 and sugarcube 2.14
To make some passage lighter, I made a "display passage".
The purpose of this "display passage" is to show some image depending of a rand.
Here is the code :
<<if $Woman>><<if $WS2==1>>[img[Pics/NPC/Random/NW1.jpg]]<<set $Woman to false>><<elseif $WS2==2>>[img[Pics/NPC/Random/NW2.jpg]]<<set $Woman to false>><<elseif $WS2==3>>[img[Pics/NPC/Random/NW3.jpg]]<<set $Woman to false>><</if>><<else>>[img[Pics/Town/Streets/Main Street.jpg]]<</if>>
<<if $Schoolgirl>><<if $SG2==1>>[img[Pics/NPC/Random/NSG1.jpg][$Schoolgirl to false]]<<elseif $SG2==2>>[img[Pics/NPC/Random/NSG2.jpg][$Schoolgirl to false]]<<elseif $SG2==3>>[img[Pics/NPC/Random/NSG3.jpg][$Schoolgirl to false]]<</if>><<else>>[img[Pics/Town/Streets/School street.jpg]]<</if>>
The fact is that "$Woman" is in a different passage than "Schoolgirl". So if I call the "display passage", I see two pics.
So my question is : Is there a way to call only a part of a "display passage"?
I look in the sugarcube documentation, and I don't find it.
Thanks.
Comments
If you know the name(s) of the passage(s) that you want the Woman related images to appear in then you could use that to determine which set of images to choose from. You can use the passage() function to determine the name of the current passage being shown.
note: I don't know the names of your passages so I has to make them up, I also don't have access to your images so the example outputs text instead.
1. Woman passage:
2. Schoolgirl passage:
3. Display Image passage:
I was looking in the wrong section of sugarcube ...
Answered.