Twine Version: 2.3.8
Story Format: Harlowe 1.2.2
I’m trying to build a bookshelf where the player can examine multiple books, then have the book’s title appear below. Each time they click a new book, it should replace the existing title (if any), but I can’t figure out how to get this to work.
For example, in my Library passage:
(link-repeat: “Look at Book 1”)[(set: $book to ‘b001’)]
(link-repeat: “Look at Book 2”)[(set: $book to ‘b002’)]
(link-repeat: “Look at Book 3”)[(set: $book to ‘b003’)]
Then in the passage titled “Books”:
(if: $book is ‘b001’)[
Lord of the Rings
](else-if: $book is ‘b002’)
Pride & Prejudice
So if the player looks at Book 1, then I want them to be able to click Book 2 and have “The Lord of the Rings” replaced with “Pride and Prejudice”, except that I’m not seeing any text at all where the (display) macro is. It looks like the variable is setting, but not being called correctly. This is my first time using a display macro, so maybe I’m misunderstanding something. Any help appreciated!