Twine Version: Harlowe 2.1
Hey all! I’m messing around with the storylets macros in Harlowe, and had a question. Can I set up an (if:) macro to check whether any open storylets exist before serving one to the player? I imagine it would look something like the following (potential code set between asterisks):
(set: _randomStoryletDatamap to (either: …(open-storylets:))
*here's where I don't know what to do, but I suspect it would look something like: (if: the datamap has any data in it at all, run the following - if it doesn't, because there are no open storylets, hit the else statement below)[*
(set: _passageName to _randomStoryletDatamap’s name)
You look (either:“to the left”, “to the right”, “directly in front of you”) and see a door.
(link: “Go through the door”)[(go-to: _passageName)][[Pick a different door->RoomPick]]
*]*
(else:)[[[Your hand clasps the knob of the only door left.->FinalDoor]]]
Any pointers?