DCypher
July 8th, 2004, 11:38 AM
I'm seeing weird behavior with TIME_Sleep & triggerEvent...
I'm basically parsing off 3 digits and triggering an event for each, but i want a 300 ms delay between events... simple enough.
My script is along the lines of:
for i = 1,3 do
TriggerEvent("foo", 18);
TIME_Sleep(300);
end
When i run this, i see nothing for 1 second, then i see 3 triggered events back to back (no delay). I logged the output and sure enough, here's what's happening... The triggerEvents don't actually fire until AFTER the script finishes... it queues them up and sends them with no delay! Ugh! Is there a fix for this? Has anyone else seen this behavior?
I'm running Girder 3.2 with the latest WinLuaEx plugin.
TIA!
Jeff
I'm basically parsing off 3 digits and triggering an event for each, but i want a 300 ms delay between events... simple enough.
My script is along the lines of:
for i = 1,3 do
TriggerEvent("foo", 18);
TIME_Sleep(300);
end
When i run this, i see nothing for 1 second, then i see 3 triggered events back to back (no delay). I logged the output and sure enough, here's what's happening... The triggerEvents don't actually fire until AFTER the script finishes... it queues them up and sends them with no delay! Ugh! Is there a fix for this? Has anyone else seen this behavior?
I'm running Girder 3.2 with the latest WinLuaEx plugin.
TIA!
Jeff