chromium Posted June 20, 2014 Posted June 20, 2014 ... I can't find by search function in the forum, I can't find it on hoggit wiki, I can't find also in the mission.lua file... surely I'm doing something wrong :( So, is there a way to retrieve mission start date by script, like I can do with mission start time (hour), which is in the mission.lua file? Thanks for your patience... Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
ajax Posted June 20, 2014 Posted June 20, 2014 Everything in the mission file is available to your script by reading the Lua table: env.mission. Since the start date is stored in the mission file, it has to be there somewhere. It might be stored as the number of days since XXX, where XXX is some arbitrary start date. (I can't remember what it is, though.)
cichlidfan Posted June 20, 2014 Posted June 20, 2014 It might be stored as the number of days since XXX, where XXX is some arbitrary start date. (I can't remember what it is, though.) Due to the way the ME tracks start times, this is almost certainly the case. ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:
chromium Posted June 20, 2014 Author Posted June 20, 2014 The arbitrary date should be 1st June 2011, If I remember correctly, but I can't find a value that should match with it, while start time is easily found and it's in seconds from 00.00. Well I'll look again... :) Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
chromium Posted June 21, 2014 Author Posted June 21, 2014 ok I just discovered that "start_time" is in seconds from the 1st June, i.e. the 1st. July is about 2.600.000 seconds :s Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
Recommended Posts