- Apr 1, 2019
- 7
- 9
Hi all, I apologize if this is a stupid question, I am new to Twine and have a very limited understanding of it. However, I have searched and could not find an answer that worked for me.
I am using Twine with Sugarcube, and what I am trying to do is have it so the image/gif/video that appears on a passage is randomly selected from a pool of images. Such as visiting a person and 1 of 10 images are shown. Right now my "Fix" for it is to just have the link to a passage lead to a random passage with a different image using
<<set _randomNumber = random(1, 8)>>
<<switch _randomNumber>>
<<case 1>>
But I feel this is a very sloppy and bad method and would much prefer to have one passage be able to display multiple ones.
Thank you!
I am using Twine with Sugarcube, and what I am trying to do is have it so the image/gif/video that appears on a passage is randomly selected from a pool of images. Such as visiting a person and 1 of 10 images are shown. Right now my "Fix" for it is to just have the link to a passage lead to a random passage with a different image using
<<set _randomNumber = random(1, 8)>>
<<switch _randomNumber>>
<<case 1>>
But I feel this is a very sloppy and bad method and would much prefer to have one passage be able to display multiple ones.
Thank you!
Last edited: