Hi there,
I've been using Furkle's cycling links add-on in Harlowe 1.2.2 and it was working great until I tried using a $variable within the cycling text. The main character's name is set at the start of the game ($firstname) and I wanted to be able to refer to what they chose within the options which you can cycle through. However, when I attempt this it just displays '$firstname', rather than 'Jimmy' or whatever, and also won't cycle to the third option; it only displays the first two options.
I'm not great with code so it's probably completely obvious why javascript(?) can't access harlowe variables, but it would be great if someone could help me make it work!
Here's the actual code I'm using currently:
I've been using Furkle's cycling links add-on in Harlowe 1.2.2 and it was working great until I tried using a $variable within the cycling text. The main character's name is set at the start of the game ($firstname) and I wanted to be able to refer to what they chose within the options which you can cycle through. However, when I attempt this it just displays '$firstname', rather than 'Jimmy' or whatever, and also won't cycle to the third option; it only displays the first two options.
I'm not great with code so it's probably completely obvious why javascript(?) can't access harlowe variables, but it would be great if someone could help me make it work!
Here's the actual code I'm using currently:
(set: $robots to "They were each in their own little padded slot. There was something about the way they fitted so snugly which really appealed to $firstname; it was probably why they bought this particular box of robots.")<tw-link class='cyclingLink' data-cycling-texts='["They were each in their own little padded slot. There was something about the way they fitted so snugly which really appealed to $firstname it was probably why they bought this particular box of robots.", "'Good afternoon, boys and girls,' $firstname said absent-mindedly as they waited for the little robots to power up. They said it quietly, to themselves, in the way you might say hello to a magpie.", "$firstname tapped their fingertips on the metal casing as they waited for the robots to boot. They wondered whether they were actually loading up, or if it was just a ploy to make you think there was more in there to load."]' onclick='clickCyclingLink(this, "$robots");'>$robots</tw-link>