How to Make Text Automatically Cycle/Change Without Player Interacting (Harlowe 2.3.16)

Howdy.

I’m sure there’s some clunky, brute force way I could maybe cobble this together, but I wanted to know if anyone had a more efficient, practical idea.

Basically, I have a passage in my story where your character gets asked: “What are you doing in there?” For stylistic and also space reasons, I want text to appear that cycles repeatedly through three different dialogue options, at a rate of, say, 1 per second: “Nothing.” / “Brushing my teeth.” / “Playing Bloody Mary.” Kind of like a (seg-link:) or a (cycling-link:), but with hooks instead of links, and it cycles through the options automatically, without the player needing to click or interact. When the player does click, the option they clicked freezes in place and the cycling stops.

I think I could handle most of the other stuff, if I just knew how to get text to automatically change to other text on a fixed cycle. Is that possible? Did I explain that well? The workaround I could maybe dream up would use a bunch of (live:) and maybe (replace:)… but I don’t know.

Thought? Thanks!

After a few hours of experimentation, I got the following code working! All it took was a sequence of (replace:) looped at the end with a (rerun:), then three variables interspersed at different points to halt the process once the player clicks on their chosen answer.

For anyone curious or having the same very specific problem, here’s the (messy) code:

(live: 1s)[(stop:) |Answer>[Nothing.(live: 1.5s)[(stop:)(if: $Nothing is true)[](else:)[(replace: "Nothing.")[Brushing my teeth.(live: 1.5s)[(stop:)(if: $Brushing is true)[](else:)[(replace: "Brushing my teeth.")[Playing Bloody Mary.(live: 1.5s)[(stop:)(if: $Playing is true)[](else:)[(rerun: ?Answer)]]]]]]]]]]

{
(Click-replace: "Nothing.")[Nothing. (set: $Nothing to true)] (Click-replace: "Brushing my teeth.")[Brushing my teeth. (set: $Brushing to true)] (Click-replace: "Playing Bloody Mary.")[Playing Bloody Mary. (set: $Playing to true)]
}

1 Like