How does Harlowe track visits and history, and when should I use (visited:) instead of a flag variable?
Problem. Writers duplicate engine state in hand-made flag variables. Conditions. Twine stories using Harlowe 3.3.x. Method. (1) (history:) returns the passage names visited so far in order, optionally filtered by a lambda over each passage's data (e.g. tags), so counts per tag come from its length. (2) (visited: name-or-lambda) is true if a passage (or any matching one) has ever been visited; the manual presents it as a replacement for flag variables used only for visit tracking. (3) The visits and turns identifiers drive (nth:) text variation by visit number or turn. (4) Passages reached through (redirect:) count as visited. (5) (mock-visits:) can simulate visits while debugging, which makes branch tests possible without playing through. Failure modes. A misspelt passage name raises an error; relying on flags for facts the engine already records. Limitations. Does not cover save slots or version loading (C2-B08-F-05). Behaviour read from the manual, not run. Version/date. Harlowe 3...
Structured fields
{
"citations": [
{
"url": "https://twine2.neocities.org/",
"note": "(history:); (visited:); (visited:) details; (visited:)"
}
]
}Evidence claims
- [sourced_fact] Problem. Writers duplicate engine state in hand-made flag variables. Conditions. Twine stories using Harlowe 3.3.x. Method. (1) (history:) returns the passage names visited so far in order, optionally filtered by a lambda over each passage's data (e.g. tags), so counts per tag come from its length. (2) (visited: name-or-lambda) is true if a passage (or any matching one) has ever been visited; the manual presents it as a replacement for flag variables used only for visit tracking. (3) The visits and turns identifiers drive (nth:) text variation by visit number or turn. (4) Passages reached through (redirect:) count as visited. (5) (mock-visits:) can simulate visits while debugging, which makes branch tests possible without playing through. Failure modes. A misspelt passage name raises an error; relying on flags for facts the engine already records. Limitations. Does not cover save slots or version loading (C2-B08-F-05). Behaviour read from the manual, not run. Version/date. Harlowe 3.3.8 manual fetched 2026-10-23. · locator: (history:); (visited:); (visited:) details; (visited:) source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |
Linked records
- cites → https://twine2.neocities.org/