sigzegv Posted December 3, 2016 Posted December 3, 2016 (edited) Some part of my mission is managed by a lua script file I load in a "do script file" action. The issue is when I modify the lua script, and even if I click save button, the .miz file doesn't seem to be updated with the new script file, it's like the editor does not refresh included script file until a do "open" in the "do script file" action and browse for the same file again. Then if I save the mission, the lua script is updated correctly, but I would like a way to have the lua script file updated in the mission without clicking "open" button each time. Anyone already had this issue ? Is the a way to fix that ? Edited December 4, 2016 by sigzegv
Chump Posted December 3, 2016 Posted December 3, 2016 After modification of your LUA script, save it on your PC. Delete the Do Script File action in the mission editor and hit Save. Then, add the Do Script File back into your mission pointing to the updated script and hit Save again. This should update the .miz file with your latest script. This has been a "thing" for a while now.
sigzegv Posted December 3, 2016 Author Posted December 3, 2016 Thnx for your help I found now an easier workaround because it's really painfull to regen the do script file action each time, instead now I created a "do script" action alone with a call to my script inside likedofile([[c:\to\my\script.lua]])This way I don't have to worry about saving the mission in the editor if I only have to modify my script, and this way I can quickly run the mission for testing. And when I'll need share the mission I only have to include the script in a "do file script" action 2
Grimes Posted December 4, 2016 Posted December 4, 2016 It has been an issue that is nearly impossible to narrow down the cause of it. The main problem being that I've never really been able to consistently reproduce it occurring and it seems to be random. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Panhead Posted December 4, 2016 Posted December 4, 2016 Thnx for your help I found now an easier workaround because it's really painfull to regen the do script file action each time, instead now I created a "do script" action alone with a call to my script inside likedofile([[c:\to\my\script.lua]])This way I don't have to worry about saving the mission in the editor if I only have to modify my script, and this way I can quickly run the mission for testing. And when I'll need share the mission I only have to include the script in a "do file script" action Brilliant. Saves me much time testing.
Recommended Posts