It looks like you're new here. If you want to get involved, click one of these buttons!
<<click "Faster">> <<set $shipSpeed = "1s">> <</click>> <<click "Slower">> <<set $shipSpeed = "10s">> <</click>> Distance from Earth: <span id="countdown">10</span> million miles <<silently>> <<timed $shipSpeed>><<replace "#countdown">>9<</replace>> <<next>><<replace "#countdown">>8<</replace>> <<next>><<replace "#countdown">>7<</replace>> <<next>><<replace "#countdown">>6<</replace>> <<next>><<replace "#countdown">>5<</replace>> <<next>><<replace "#countdown">>4<</replace>> <<next>><<replace "#countdown">>3<</replace>> <<next>><<replace "#countdown">>2<</replace>> <<next>><<replace "#countdown">>1<</replace>> <<next>><<goto Earth>> <</timed>> <</silently>>
Comments
You can, however, use the <<repeat>> macro to achieve what I believe you desire. For example: (assume $shipSpeed is 5) NOTE: Off-the-cuff and untested, as I am, literally, running out the door for some medical appointments.
Don't do that. While it will still work, due to legacy shims, that is SugarCube v1 code. The equivalent SugarCube v2 code would be the following: SEE: Engine.show(), Engine.play(), State.passage.
Actually that was just a silly example. The thing is, my passages are loaded with timed stuff and click-replaces, so by the time I want to change a variable value the user has already chosen to do multiple things that will be undone if the passage reloads.
However your solution does work and solves most cases with some modifications here and there.
Thank you