I'm hoping a macro already exists for this, it seems like something that would be simple and useful. My game involves revisiting passages, with some text changing on subsequent visits. As a simple example, the player might be surprised by something they see the first time, but the next time the thing would just be described. Currently I'm doing this by setting variables for each instance, but its getting really messy because there's a lot of it in my game.
I'm picturing the syntax something like this:
<<changingtext>>You are surprised to see a cat here!<<second>>That cat's still hanging around.<<third>>The cat meows plaintively.<<final>>You're getting sick of that damn cat.<<endchangingtext>>
The final text would stay consistent for all visits after that.
I'm in Sugarcube, by the way. Thanks for reading!
EDIT: L's <<later>> macro (part of the revision macro set) almost does what I want, except that it doesn't display text on the initial passage visit.
Comments
I have just started my first game (and this is my first post here
Stew.
Exactly right. Unless you need to check another passage, calling visited() with no argument is the way to go.
[/code]::Room
<<msg state.history[0].variables.cat>>[/code]