Alec,
You can use the Sleep(milliseconds) function that was added to the VBScript module BUT this is most likely NOT want you want to do. When you use this command you will put all of RR to Sleep for that amount of time ... in other words the video will stop.
Instead you should add a form of state to your VBScript module to delay changing of the value until needed. Following is a quick example of how to do that delay.
state = GetVariable("state")
if state = 0 then
SetVariable "servo_motor", 255
SetVariable "state", 1
SetTimedVariable "state", 2, 5000
elseif state = 2 then
SetVariable "servo_motor", 128
end if
which will set the servo to 255, wait for 5 seconds and then set it back to 128 while still executing any other module within RR. This type of programming is known as a state machine.
Note that state 1 is a do nothing step with the timed variable function changing back to a valid step 2 after 5000 milliseconds.
Hope this makes sense.
STeven.
|
|