Howdy, Stranger!

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

Question about Harlowe, images, and the (live:) macro

Hello! I made this Twine story for my job. I am using Harlowe and Twine in the browser (Chrome).

I've created a new copy of the story so I can improve some things about it before I share it publicly. Right now, I am trying to use the (live:) macro to display an image once the reader has been in a passage for 5 seconds. Here's what I've written in the passage:
(live:5s)(display: <img src="the full path to a test image in our Wordpress library" width="300" height="199">)

When I test this in the browser, I get the following message:
I need some code to be left and right of ">"
I tried to use an operation on some data, but the data's type was incorrect.

So I guess I have two questions:
1. What code does Twine need to be left and right of ">"?
2. Is the (live:) macro going to break if I publish the game to a file from the browser and upload it to our Wordpress media library, like I did with the version linked above?

I know extremely basic HTML and close to nothing about Javascript, so this may be beyond my pay grade. But if anyone wants to help me bugfix a cool educational resource about social services, I'd hugely appreciate it! Thank you!


  • To my knowledge you'll just need some brackets in there some place.

    like this:
    (live:5s)[This is text with the 5 second delay on it.]

    But I have no idea about showing an image.
  • The (display:) macro is used to display one passage contents inside another, try using the (print:) macro instead. Your (live:) macro is also missing it's associated hook []

    Something like the following should work:
    (print: '<img src="the full path to a test image in our Wordpress library" width="300" height="199">')
    ... you can safely remove the extra line-breaks I added to the above to make it more readable.

    The (live:) macro should work if you create a story HTML file and upload it somewhere.
Sign In or Register to comment.