Assigning variables live

I’m using the latest version of Twine and the latest version of Harlowe

Soooo I was making a mini game a couple days ago, and I hit a problem. I didn’t know how to assign variables in real time.

For example, what would I do if I wanted to add one to a variable every time a second passed? I know that I could do (after: 1s)[(set: $variable to it +1) but I want it to add one every time a second passed. Help needed, HouseonaTree :slightly_smiling_face:

I think it’s (live: 1s)[(set $variable to it + 1)] (see the docs)


Thank you soooooo much :grinning:.

P.S. Funny thing is, I tried something similar like that, but it didn’t work, so I dug into the Harlowe docs, and 2 hours later I realized that I knew what a Lambda was, and what navigation and pattern macros were and so much more but I still didn’t have my answer. So once again, thank you @JoshGrams, you saved me countless hours of reading Harlowe docs :smile: - HouseonaTree

1 Like