Using Twine in Harlowe.
I’m trying to make a hacking game where players are prompted to enter a string of text on the screen accurately within a specific period of real world time. (basically a ticking countdown till you lose the game)
I have code that works for both the prompt and the timer, but the timer is not taking effect until the prompt is entered. Is there a way to do this so that the timer function will be on going while the prompt is on the screen?
Here is the code I have so far (want to get it working before I start adding random seeds for the player to type)
(set: $timer to 10)
(if: $timer is 0)[
(goto: “Locked Down”)
(set: $timer to it - 1)
Security lock down in $timer seconds
(link: “start hacking.”)[(set: $name to (prompt: “Enter Command”, “”))
(set: $command to “Hack thing.”)
(if: $name is “Hack thing.”)(goto: “Good job you hacked it.”)[(set: $name to (prompt: “Incorrect Command. Enter Command”, “”))(if: $name is “Hack thing.”)[(goto: “Good job you hacked it.”)] ] ]
Thanks for any help.