It looks like you're new here. If you want to get involved, click one of these buttons!
[Thanks]<shout|
(click: ?shout)[(replace: ?shout)[[Thants]<shout2|] ]
(click: ?shout2)[(replace: ?shout2)[[France]<shout3|] ]
(click: ?shout3)[(replace: ?shout3)[[Franks]<shout4|] ]
I'd love this to cycle infinitely so that clicking Franks takes you back to Thanks and repeats the order. Is this possible? I tried the following line to no luck.
(click: ?shout4)[(replace: ?shout4)[[Thanks]<shout|] ]
Any advice appreciated!
Comments
A. First an explanation about hooks, the (replace:) macro and why you were having problems with your example:
The (replace:) macro does not replace a hook, it replaces the contents of a hook, which sounds like the same thing but isn't.
So in your example once you have clicked all the links the HTML of your story looks something like the following: As you can see you end up with hooks within hooks, so when you tried to add the extra (click: you would of ended with two hooks with the same name, which is not good.
B. Now, the possible solution to your problem using 2 variables, and the (link:) and (live:) macros!
1. First the code: 2. The (live:) macro is checking the current value of the $selected variable every 1/4 of a second and if it changes to true it updates the value of the $shout variable to what should be displayed next. It then updates the ?prompt so the link works again.
A copy of the above (live:) macro formated so it is more readable: 3. The problem with the above (live:) macro.
Live macros don't stop looping unless you manually tell them to by using the (stop:) macro, the problem in the above is that because you want the link to keep changing every time it is clicked there is no simple way to know when to manually stop the (live:) macro.