[Twine2][Harlowe 2.0.1] Automatic re-directs after certain amount of seconds (time keyword not working)

+1 vote
asked Sep 17, 2017 by valdavaux (270 points)

So I want the player to have about 5 seconds to read a text before it redirects the player automatically to the next passage....

(if: time > 5s)[(go-to:$EnemyDead)]

But t doesn't seem to work. Am I using it wrong?

1 Answer

0 votes
answered Sep 17, 2017 by greyelf (97,410 points)

Different people read at different rates which is why it is generally not a good idea to automatically move to another Passage based on a set time, because the player may still be reading the message.

You can use the (live:) macro to delay an action like so.

(live: 5s)[(go-to: $EnemyDead)]

... in this particular case you don't need to use a (stop:) macro to stop the timer event (created by the (live:) macro) from firing more than once.

commented Sep 18, 2017 by valdavaux (270 points)
Well, it was just one example of how I wanna use redirect, regardless I'd like to get it to work! I'll figure out playability of it later :)

"live" indeed does the trick. Thanks!
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...