(undo: ) → Command
This Command stops passage code and “undoes” the current turn, sending the player to the previous visited passage and forgetting any variable changes that occurred in this passage.
You scurry back whence you came... (live:2s)[(undo:)] will undo the current turn after 2 seconds.
The (go-to:) macro sends players to different passages instantly. But, it's common to want to send players back to the passage they previously visited, acting as if this turn never happened. (undo:) provides this functionality.
By default, Harlowe offers a button in its sidebar that lets players undo at any time, going back to the beginning of the game session. However, if you wish to use this macro, and only permit undos in certain passages and occasions, you may remove the button by using (replace:) on the ?sidebar in a header tagged passage.
Just like (go-to:), (undo:) will “halt” the passage and prevent any macros and text after it from running.