Howdy, Stranger!

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

Installed local version of Twine 2.0, trying to display an image with Sugarcube 2 and doesn't work?

I have created an image called home.png and placed it into the same directory as my test story (documents/twine/stories/) and used the following syntax in a passage:

[img[home.png]]

This is the exact syntax used in the sugarcube 2 documentation but it refuses to display when i test the story in twine 2.

I get this: https://i.imgur.com/Sp6miCO.png
and inspecting the HTML shows everything should be fine: https://i.imgur.com/xtVYMKs.png

I have no idea what's wrong. Can anybody help?

Comments

  • Twine itself cannot currently display images in the playtest mode. To see an image you have included into your project, you have to run off a publish and open the published file in a web browser.
    Basically, just publish a TEST file, or something. <<if>> it still is not showing up in the browser, THEN you have something wrong, but this is almost certainly just the lack of image support.

    Trust me, it gets REALLY annoying when you're using imagemaps for navigation between areas in a game. Having to test-pub a new file and open it in another program EVERY TIME I want to test my progress can be really annoying sometimes.
  • A locally referencing URL requires the media file (like an image) being referenced to be stored relative to the HTML file doing the referencing, so generally the media file needs to be either the same folder as the HTML file or within a child folder.

    The technical reason why you can't display/play a media file (like an image) using a local reference URL while using either the Test or Play options is because the temporary HTML document created by those two options only exists in memory, thus there is no physical HTML file (1) for the media file to be relative to.

    (1) Some environments may create a related physical operating system level temporary file within it's own temporary file storage area, but relying on this fact is not a good idea.
Sign In or Register to comment.