+1 vote
asked by (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 by (114k 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 by (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.
...