View Full Version : DVE Script Help
johnhuebbe
12-29-2005, 11:43 PM
I'm trying to write a simple script to load the correct DVE, quickly fade my DSK, then run Auto on the DVE that I choose...
My code is:
fnc_Take1() = {
SetDVENumber(2)
WaitForDVEToBeLoaded()
SetSpeed(0.75)
DSKFade()
WaitForDSKToFinish()
SetSpeed(0.25)
Auto()
WaitForAutoToFinish()
}
But, when I run this, the DVE gets set to 2 and shows that it is outlined, but it does not get used. It uses whatever DVE was previously selected to do the Auto. Am I doing something wrong? :help:
John Perkins
12-30-2005, 03:35 AM
You're doing it right, it's a bug in the WaitForDVEToBeLoaded() command from what I can tell.
If you take everything out after SetSpeed(0.25) and hit auto yourself, it works. TS is just too fast with a broken wait command.
I had to make a Wait() function to work around the bug. BTW, I had to wait a FULL second for mine to work. Even 900ms was too soon.
Try this and see if it helps.
AddMenuItem("Test Script", code(
Wait(ms)={Now=0
StartTime = GetTime
Later = StartTime + ms
while( Now < Later){ Now = GetTime }
return Later}
SetDVENumber(2)
WaitForDVEToBeLoaded()
SetSpeed(0.75)
DSKFade()
WaitForDSKToFinish()
SetSpeed(0.25)
timer = Wait(1000)
Auto()
WaitForAutoToFinish()
)
)
I turned this in as a bug report. When I cut the script down to the bare minimum to show them the problem, I realized that I had to go to 1500 (1.5 seconds). I have a 10K SCSI C: drive so your system might take longer to load DVE's. I was testing with the alien claw DVE.
Good luck,
johnhuebbe
12-30-2005, 06:34 PM
Thanks for the new script!
Hopefully they will get this bug fixed. I was able to reduce my wait time depending upon what DVE I choose. I also placed the wait command before I fade my DSK because I didn't want the wait time between my DSK fade and running my DVE. I'd rather wait the second in the beginning before running the script.
AddMenuItem("Test Script", code(
Wait(ms)={Now=0
StartTime = GetTime
Later = StartTime + ms
while( Now < Later){ Now = GetTime }
return Later}
SetDVENumber(2)
WaitForDVEToBeLoaded()
timer = Wait(700)
SetSpeed(0.75)
DSKFade()
WaitForDSKToFinish()
SetSpeed(0.25)
Auto()
WaitForAutoToFinish()
)
)
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.