Passage and History
Often, it can be highly useful to know which passages a user has visted and where, at any one moment, they are.
To help with this, Harlowe supplies two macros:
[[Passage Macro]]
[[History Macro]]What if you wanted to know the content of a passage without using //`(display:)`//? What if you wanted to know the name of the player's current passage in order to compare it to something else? The //`(passage:)`// macro can help with those and other things.
When used without a named passage, the //`(passage:)`// macro returns information about the current passage. Accessed as a datamap, attributes such as its //name//, //tags//, and //source// can also be retrived through the possessive "//'s//" usage.
For example, if you wanted to do a strange thing like combine the source of two passages and then "run" it, you could.
{
(set: $content to (passage: "TestPassage1")'s source)
(set: $content to it + (passage: "TestPassage2")'s source)
}
Look, `$testVar` is $content!
[[History Macro]] While the //`(passage:)`// macro gives information about the present, //`(history:)`// can help in retrieving data about the past.
For example, so far, we have visited:
(for: each _place, ...(history:) )[
I was at //_place//]
[[Passage Macro]](set: $testVar to 5)$testVar