Well here's a trick I just discovered. It's possible to make cycling links with (link-repeat:)
(set: $cycle_list to (array: "Good", "Nuetral", "Evil"))
(set: $cycle_index to 1)
Your alignment is (link-repeat: "[(print: $cycle_list's $cycle_index)]<cycle_link|")[(set: $cycle_index to it + 1)(if: $cycle_index > $cycle_list's length)[(set: $cycle_index to 1)](replace: ?cycle_link)[(print: $cycle_list's $cycle_index)]]
Well here's a trick I just discovered. It's possible to make cycling links with (link-repeat:)
(set: $cycle_list to (array: "Good", "Nuetral", "Evil"))
(set: $cycle_index to 1)
Your alignment is (link-repeat: "[(print: $cycle_list's $cycle_index)]<cycle_link|")[(set: $cycle_index to it + 1)(if: $cycle_index > $cycle_list's length)[(set: $cycle_index to 1)](replace: ?cycle_link)[(print: $cycle_list's $cycle_index)]]
No more need for a second passage.
Although that works, it is using an undocumented effect that being the ability to embed a Named Hook within the link's Text. That ability may be by design or by accident, and if by accident then it may stop working in a future update of Harlowe.
A possible issue with your solution is the that a text replace will affect the whole passage So if the text of one of the links appears in the passage then that will be replaced as well.
For instance if your example had contained the text "Frederick leads you to the pedestal." then after a couple of clicks that would become "Harry Pottererick leads you to the pedestal". Also since the index gets increased for each replacement, the link would jump straight to Ozymandius.
Though, as long as you know that the text from the links don't appear in the passage then your method is safer, so I'd like to include it in my Harlowe cookbook.
Comments
Well here's a trick I just discovered. It's possible to make cycling links with (link-repeat:)
No more need for a second passage.
https://bitbucket.org/_L_/harlowe/issues/24/add-a-click-repeat-macro
https://bitbucket.org/_L_/harlowe/issues/6/add-link-keyword-denoting-the-link-that
For instance if your example had contained the text "Frederick leads you to the pedestal." then after a couple of clicks that would become "Harry Pottererick leads you to the pedestal". Also since the index gets increased for each replacement, the link would jump straight to Ozymandius.
Though, as long as you know that the text from the links don't appear in the passage then your method is safer, so I'd like to include it in my Harlowe cookbook.