Is there a way to have a passage display constantly at the start of every other passage without writing <<display ...>> on every page?
I am using a fairly complicated method to display multiple layers of variable images, and I assemble all the images in a passage called "scene". I want to display "scene" in every single passage, and I could just add the <<scene>> to each one, but I thought maybe there was a more elegant solution...?
Comments
I also have a module, made for me by TheMadExile, which creates sort of a duplicate #passages div in Sugarcane. You could use it to hold your images, freeing the default Twine passages for separate use. (When I was doing something similar - displaying images conditionally, based on user input - this is the method I used. In my case, it was very simple, because all I was doing was displaying images based on a variable that tracked player progress - <<if $progress is 5>>this image<<else if $progress 6>>other image<<endif>>, etc. It could easily accommodate a much more complex system, however. As I said, though, this method isn't as easy as my previous suggestion; I only used it myself because I was doing something very particular with CSS styling.)
my game currently layers animated gifs, and uses different pictures depending in the state of variables:
regular story passage: <<set $dog to "sleep"; $roomnumber to 2>>
scene passage: [img[$dog + "dog]] [img["background " + $roomnumber]], etc.
images: sleepdog, wakedog, walkdog, background1, background2, ...
Do you think that the module you used would be suitable in this context?
I added some documentation. I think I covered everything, but let me know if you have any questions.