CougarFFW04 Posted November 7, 2018 Posted November 7, 2018 Hi Lua scripting Gurrus, Let's imagine that I have a mission starting at HH:MM:SS/DD Is is possible with a Lua function to change (via Lua script) the starting mission time (to whatever) when the mission loads ? Thanks
Chump Posted November 7, 2018 Posted November 7, 2018 There is no setter for mission time as far as I'm aware. It is stored inside the .miz file, and read upon mission load. You would need to manually edit the mission file each time before you started it up.
chromium Posted November 8, 2018 Posted November 8, 2018 You can do that by a very-very-very ugly solution. You need a code to be placed as an "hooks" file that: 1) as soon as the mission is loaded, unzip the .miz file you loaded, read the "mission" file and load it as a table 2) create the new day, month, year and start time value from os time, and replace the values into the loaded mission table 3) save the mission table as a file overwriting the previous one 4) repack everything into a .miz file that has a different name than the one you opened. 5) load this file. I temporarly did that to update current weather but then I left those solution cause it was really extremely ugly and only static weather could be updated from a real single location and then applied to the entire map (ugly itself): DCS do not have a callbacks that allow you to do this thing BEFORE loading the file, so you will see a loaded mission and like instantly after the loading it will load again the new file (if everythings works correctly). 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.
CougarFFW04 Posted November 8, 2018 Author Posted November 8, 2018 Hi, Thanks for the tips. Too bad that we cannot do that in an "easy way".
Recommended Posts