Frag Posted September 18, 2018 Posted September 18, 2018 (edited) Hi guys, two questions here. I want to calculate the time it take for a plane to go from zone A to zone B. I wanted to use the standard LUA command os.time() but it seems that we cannot use it in DCS. Is the LUA interpreter too old? What are my option to pickup the start time, end time and calculate the difference between them with moose? Edited September 18, 2018 by Frag
funkyfranky Posted September 18, 2018 Posted September 18, 2018 All os commands are forbidden in DCS by default. Also io and lfs. You would need to comment out the sanatizeModule lines in the MissionScripting.lua in the DCS root/Scripts folder. But you don't need that or Moose for what you want. Use the build in DCS timer functions https://wiki.hoggitworld.com/view/DCS_singleton_timer Eg timeA=timer.getTime() .... timeB=timer.getTime() .... deltaT=timeB-timeA -- Duration between event A and B in Seconds. A warrior's mission is to foster the success of others. i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
Frag Posted September 18, 2018 Author Posted September 18, 2018 All os commands are forbidden in DCS by default. Also io and lfs. You would need to comment out the sanatizeModule lines in the MissionScripting.lua in the DCS root/Scripts folder. But you don't need that or Moose for what you want. Use the build in DCS timer functions https://wiki.hoggitworld.com/view/DCS_singleton_timer Eg timeA=timer.getTime() .... timeB=timer.getTime() .... deltaT=timeB-timeA -- Duration between event A and B in Seconds. This is EXACTLY what I was looking for. Thanks a LOT buddy!
Recommended Posts