Changing backgrounds in Harlowe

Does anyone know whether it is possible to change image backgrounds using a variable in Twine 2.6.0 using Harlowe 3.3.4.

I currently have my backgrounds in my CSS, and I am wondering if there is a way to call on these or to switch tags in my chapters somehow

You probably want to use Javascript for this:

<script>document.body.style.backgroundImage = 'url("IMAGE/PATH/GOES/HERE")'</script>

Just putting this in the text of a node should do it.

1 Like