Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Trying to get background image on a passage

$
0
0
Twine 2.1.0, Harlowe 2.0

I want to use an image for the background for a single passage. I'm trying this:

(background: "example.jpg")?Page

But I get this error:

The (background:) command should be assigned to a variable or attached to a hook.►
?Page

Figured "?Page" was OK for the "background:" macro. The Harlowe documentation suggests this is possible.
"?Page selects the page element (to be precise, the <tw-story> element) and using it with the (background:) macro lets you change the background of the entire page."

Unless perhaps this doesn't work for images.

I tried (enchant:) using an image name,

(enchant: ?page, (background: "example.jpg"))

but it just fails silently; no error message. Now, I understand that a missing image fails (silently) but an "<img" tag works just fine with the same image.

Any help appreciated.

Viewing all articles
Browse latest Browse all 1844

Trending Articles