Hello there!
I searched for a solution for this but couldn't find any.
I'm new to Twine or any kind of game design for that matter. I'm trying to use this cyclinglink macro in Twine 2 following the instructions provided by s2tephen
(set: $cyclinglink to (array: "off", "low", "high"))
(set: $cl_index to 0)
The power is currently set to [(print: $cyclinglink[$cl_index])]<cl|.
[]<cl_macro|
(replace: ?cl_macro)[(display: "cyclinglink")]
But I just keep getting this message when I try to run it:
I can't display the passage 'cyclinglink' because it doesn't exist.
On top of that the link stays unclickable in the "off" postition.
I don't know what's wrong, I put the code above mentioned in a passage and then I put this on in another passage called
cl_macro as advised:
{
(click: ?cl)
[
(if: $cl_index is $cyclinglink.length - 1)[(set: $cl_index = 0)]
(else:)[(set: $cl_index += 1)]
(replace: ?cl)[(print: $cyclinglink[$cl_index])]
(replace: ?cl_macro)[(display: "cyclinglink")]
]
}
I'm kind of lost and desperate, do any of know what's wrong??
Thanks for your time...
link to s2tephens' cyclinglink
https://gist.github.com/s2tephen/459de15106f66ce67e53
Comments
Try the following, it is based on s2tephens example.
The first part goes in a Passage named cyclinglink: ... and the second part goes in whichever Passage you want the text and link to appear in:
note: I renamed one of the variables and the first hook in s2tephens example.
Thanks!