Frag Posted September 18, 2018 Share 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 Link to comment Share on other sites More sharing options...
funkyfranky Posted September 18, 2018 Share 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 | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Link to comment Share on other sites More sharing options...
Frag Posted September 18, 2018 Author Share 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! Link to comment Share on other sites More sharing options...
Recommended Posts