So, what I want to do is to be able to click on a bit of text and replace it with a passage or the return value of a function. (Specifically, I'm making procedurally generated text via
twinecery, and I want a snippet of text to be a link to re-generate itself.) Having some trouble getting that to work with either <<cycle>> or <<cyclinglink>>. Any help to set me in the right direction would be very, very appreciated.
= = = = =
It looks like <<cyclinglink>> is very close to what I need, but it can only rotate between plain strings, and I need to feed it a passage or a function call.
i.e., this doesn't work:
<<cyclinglink $fruit either("apple", "banana", "cherry")>>
= = = = =
So, <<cycle>> can rotate between a passage or function call, but... the trigger macro <<revise>> has the same problem as <<cyclinglink>>.
i.e., this doesn't work:
<<cycle foo>><<revise foo "<<set $fruit to either("apple","banana","cherry")>><<$fruit>>">><<endcycle>>
This would maybe work if revise was instead using the <<revise>>...<<endrevise>> model, but...
Comments
I would suggest changing to an actively supported Twine 1 story format like SugarCube.
SugarCube 1 will display a warning message instead of the error message, while SugarCube 2 has been modified so that it is not effected by Chromium's History restriction. Both versions of SugarCube have downloadable add-on versions of the GloriousTrainWrecks extendard macro scripts.
Also, I think I run into the same issue with <<cycle>>/<<cyclinglink>> in SugarCube unless the SC ports have changed the functionality.
I don't know if the SC ports have the same limitations or not but at least it's developer (TheMadExile) is available to offer help and updates/bug fixes, whereas Sugarcane is no longer maintained.