Hi all,
my aim is to click on the word 'count' and increase a counter thereby, so that the new number is shown.
I do not want to switch passages.
I want to stay on the passage and only replace the number of clicks.
My solution only works for the first click, afterwards the word 'count' is neither shown as link nor clickable.
This is how I tried:
(set: $counter to 0)
The word [count]<button| was clicked [$counter]<showHowMuch| times.
(click: ?button)[(set: $counter to it + 1)(replace: ?showHowMuch)[$counter]]
As I said, this works only for the first click. Any chance to 'reanimate' the count-click while staying on this passage?
A working solution with switching passages could be the following lines, but the re-rendering of the passage looks like flickering when I click fast:
::start
The word [[count->start]] was clicked $counter times.
(set: $counter to it + 1)
I would prefer the 'hooked variant' above. Any ideas?
Thank you in advance.
Comments
In your case the Main and Logic passages would look something like the following:
a. Main b. Logic note: You don't need to name your passages the same as mine, but remember to change the (display: "Logic") call in both of the above to whatever you rename the Logic passage to.
Okay, so the trick is to display the passage instead of switching to (I think of it as eval or exec).
Indeed, does not show up the flicker-like effect.
Thank you very much for that clear answer!