0

Way of sending multiple messages back to back, each with its own delay

rds 2 years ago updated 2 years ago 0

We’re creating a little text game where we send players off to a safari. When the game gets to the state where the players are battling for their lives, we would like to send 2-3 messages with updates to their health in shorter intervals than the five minutes a trigger provides. The $delay directive seemed at first glance to help. Unfortunately, only the first delay got evaluated and any other ones were output as part of the message.

It would be great if we could do something along the lines of:

$[delay 10] First message. $[delay 20] Second message. $[delay 45] Third message.


We also tried to use setTimeout, but to no avail.