Just pass the function commands as if it were sendAll, but if you want to wait before the next command, then pass a number equal to the amount of time you want to wait, and then pass the command. Like this: sendQueue("command 1",2,"command 2") Which would send "command 1" first, then wait 2 seconds, and then send "command 2".
sendQueue function
sendQueue function
I had some people asking for a way to send a series of commands that may need to be spaced out time wise so they could do scripted behaviors. In case anyone else wants it, here it is.
Re: sendQueue function
Thanks for sharing. It's nice that it handles fractions of seconds aswell.
Re: sendQueue function
I agree. It sounds awesome, but I'm a self-taught (with forum help) novice that will never understand scripting enough to even attempt this table nonsense.chrio wrote:Thanks for sharing. It's nice that it handles fractions of seconds aswell.
Re: sendQueue function
That is why I shared this. There is no need to understand tables in order to take advantage of this function, just pass it the commands and delays you want, and it takes care of the rest.Duugan wrote:I agree. It sounds awesome, but I'm a self-taught (with forum help) novice that will never understand scripting enough to even attempt this table nonsense.chrio wrote:Thanks for sharing. It's nice that it handles fractions of seconds aswell.
Re: sendQueue function
Nice. Not sure how many people still use CMUD these days, but this would be a nice and easy substitute for the #wait function they have.