#(idyllicx) Cancelling wait command
25 messages · Page 1 of 1 (latest)
(idyllicx) Cancelling wait command
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
you could not run it
!xy
Your question seems to be an XY Problem - you're asking about your attempted solution rather than your original problem.
Read in detail about the XY Problem here: http://xyproblem.info/
For an example of an XY Problem we've seen in Denizen, the question "how do I make an event for when a flag expires" has no answer, but the same question asked with full background detail will be something more like "I have this script: [LINK HERE], which sets a 3 minute cooldown flag on a player for when they use an ability. I want the player to be notified when the cooldown completes - how do I do this?" which we can then answer quite effectively (in this example, all that was needed was a simple wait command, no events or flag-listening or anything).
^ that's basically it lol
if it's a short-term thing, you're probably looking at a while command
if it's a long-term thing, uhh
more detail please
or waituntil?
Oh, I have a command that executes stuff after a wait. /giveafter5mins <playername> will give the player an item after 5 minutes. I want it so that if I type /giveafter5mins <playername> again, I would cancel the first command/reset the timer
so that the command will only fire once even if I type if multiple times
queue
waituntil (rate:<duration>) (max:<duration>) [<comparisons>]
Delays a script until the If comparisons return true.
Delays a script until the If comparisons return true. Refer to !command if for if command syntax information.
Optionally, specify an update rate (if unset, will update at queue speed).
The update rate controls how often the tag will be checked. This generally doesn't need to be set, unless you're concerned about script efficiency.
Never set this to faster than queue update rate.
Optionally specify a maximum duration to wait for (delta time).
you could flag the server and waituntil the server doesnt have it anymore once it expires
re-apply the flag each time you run the command still of course
Oh this will just reset the timer if ever no? Is there a way to completely cancel the wait/script/queue I don't know what it is called..
basically you can't 'cancel' this, but you can just make it not do anything when it triggers
You'd use flags for that
If, after the wait expires, they don't have the appropriate flag anymore, simply do nothing
does that make sense?
ty!