nickexists Posted March 1, 2015 Posted March 1, 2015 How can I make my script wait for a given number of seconds before proceeding to the next line? I tried using: time=timer.getTime() while timer.getTime()~=time+10 do end but this crashed dcs.
FSFIan Posted March 1, 2015 Posted March 1, 2015 While executing Lua code, the simulation is frozen, so the simulation time does not advance while your loop is executing so it becomes an infinite loop. Check out mist.scheduleFunction(). DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
nickexists Posted March 2, 2015 Author Posted March 2, 2015 Thanks, I had used scheduleFunction before to loop a function, I didn't realize I could use it for this though.
Recommended Posts