can "wait" use a variable?

Help each other out

can "wait" use a variable?

Postby VRS-1 on Thu Jan 25, 2007 9:17 pm

Greetings.

Is it supposed to be possible to have the "wait" command access a variable for the time to wait?

I've used "save to variable" with the variable name "buttontesttime", information 5000. Then if I set the text of anything to %variable>buttontesttime% it shows 5000, so I presume the saving is working correctly.

If I put "variable>buttontesttime" or "%variable>buttontesttime%" into the Wait(ms) box, however, it doesn't do anything. (It crashes if I click "test" within the event editor, and simply never gets to anything AFTER the wait if executed from within Xlobby).

Am I missing something or does this not work in this way or both?


Thanks!

-VRS
VRS-1
 
Posts: 13
Joined: Wed Jan 03, 2007 5:32 pm

Postby VRS-1 on Mon Jan 29, 2007 9:08 pm

68 views and no response... I'll take that as a "no it doesn't work that way, give up."

For anyone attempting anything similar, the best I've figured is that "xlobby:run event" CAN take a variable, so you can set variable>timerevent to "10 minutes", and then run event, "%variable>timerevent%" and have a ten minute "wait" inside an event called "10 minutes". Kindof sloppy, and a bit ridiculous... requires a separate event for each time value that you require, but if you only require 3 or 5 different values, it works like a charm and is easy to set up.

Cheers,

-VRS
VRS-1
 
Posts: 13
Joined: Wed Jan 03, 2007 5:32 pm

Postby m_ski on Wed Jan 31, 2007 12:10 pm

Alternatively, use a few lines of code with the Xscript plugin.
m_ski
 
Posts: 204
Joined: Wed Dec 08, 2004 7:57 am
Location: Kent, United Kingdom

Postby VRS-1 on Wed Jan 31, 2007 4:13 pm

Yeah that does sound smarter... and easier.

I didn't have the XScript Plugin at the time this was set up... :cry:

I'm sure it'll all go smoothly the second time around!

-VRS
VRS-1
 
Posts: 13
Joined: Wed Jan 03, 2007 5:32 pm