Rabso
Members
-
Joined
-
Last visited
Solutions
-
Rabso's post in Holding control for certain time in LUA was marked as the answerScotflieger, I have done the trick :Big Grin:
here is my code to share with all:
function APU_SEL_SWITCH_start_sequence() time1 = ipc.elapsedtime() while true do time2 = ipc.elapsedtime() - time1 if time2 >= 2000 then break else APU_SEL_SWITCH_start () end end APU_SEL_SWITCH_on () end to explain,
- time1 will note the function start time
- entering a loop to keep the APU selector on Start position as long the time difference time between time2 and time1 less than 2 seconds.
- time2 will keep increasing as long the loop is going on.
- once difference time be more than 2 seconds, the loop will break, and then APU selector will go to On.