0 votes
by (160 points)
reshown by

Is there a way to reset the (history:) macro in Harlowe 1.2.4?

I'm using the quite a bit of the (if: (history:) contains "cellar")[...] and after a major event in my game, I'd like to know if I can wipe the array inside the history macro.


1 Answer

0 votes
by (159k points)

background: The Array returned by the (history:) macro is generated from the information contained within the story format's built-in Story History system which tracks which Passages the Reader has seen, the order that they saw them, and the state of all known variables at the time they saw each Passage. This same information is used by the Story Save/Load system.

Currently the only built-in way I know of to reset the History system is to restart the Story using the (reload: ) macro.

Generally if I needed to continuously track if a Passage was seen then I would use a Boolean (true/false) Story Variable instead of the (history:) macro.

by (160 points)
edited by

Unfortunately, the (reload:) macro won't work on services like Itch.io because of the reloading the iframe issue. I'll just stick with bool! Thanks for the help.