Howdy, Stranger!

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

Is it possible to have random image using Twine 2.0 Harlowe?

Pretty much the title. I'm trying to have it that either 1 of 3 pictures will show up randomly in the passage. Currently doing (either: <img src = "Source1">, <img src = "source2">) but its not working.

So is either only used to words/numbers? If so, would it be possible to make it so that it can be used for images?

Thanks

Comments

  • Is it the same area as the TWINE file? (same folder?) If not, then I'd suggest you do either that, or create a folder where the TWINE file is being played called images or something, and reference that.
  • afaik with the twine I have I have to directly link the URL for the image so I'm hosting them on my photobucket.
  • edited November 2016
    From my limited experience using the [img[imagename]] in Sugarcube 2.11.0 - TWINE can take numbers and letters in the filename so, that's not the reason you are having issues. It is probably 'not finding' the images, if you're having trouble getting them to show up - due to naming issues, or incorrect URLs. Or missing " "'s, maybe.

    But the <img src=" "> (should) work on all formats.
  • You need to quote the markup within the (either:). Try something like the following:
    (either: '<img src="image1_url">', '<img src="image1_url">', '<img src="image3_url">')
    
    NOTE: Since the <img> markup contains double quotes, I used single quotes around each when using them as arguments to (either:).
Sign In or Register to comment.