alfredo_laredo Posted April 18, 2018 Posted April 18, 2018 Hi, Im doing an Mi8 mission. While doing the Oilfield Campaign for the Mi8 the Cargo Doors would open to load and unload i guess via a script. How can I do that. I found this Unit.getDrawArgumentValue() but dont know if its from DCS script engine or from MIST. Also in one post says the Cargo Door is Argument 86 with 0 value as closed and 1 value as open. Where can I find the .lua file with all the Id and values for the Mi8 as Also I would like to know when engines are on and so on.. Thanks! A.K.A. Timon -117th- in game
Kayos Posted April 18, 2018 Posted April 18, 2018 (edited) Is there a key to open and close them? I haven't flown it in years but seem to remember that. Look in your key bindings Edit: Just looked, LCtrl + Lalt + C Edited April 18, 2018 by Kayos [sIGPIC][/sIGPIC]
Grimes Posted April 18, 2018 Posted April 18, 2018 Unit.getDrawArgumentValue() is the scripting engine and only reads the external model of an aircraft. Its not so much reading the command to open the doors as it is reading what the game has told the 3d model how to render the aircraft's specific animations. With the triggers "X: Cockpit ..." conditions you can check the status of different gauges and even do commands. Problem with both of those is that its done via knowing a number that corresponds to the action and then another number to know the values. You can look at the training missions which show the triggers for it in action. I coulda swore there is a definitive place that will tell you what the values correspond to, but I'm not sure where that is. 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
alfredo_laredo Posted April 18, 2018 Author Posted April 18, 2018 Unit.getDrawArgumentValue() is the scripting engine and only reads the external model of an aircraft. Its not so much reading the command to open the doors as it is reading what the game has told the 3d model how to render the aircraft's specific animations. With the triggers "X: Cockpit ..." conditions you can check the status of different gauges and even do commands. Problem with both of those is that its done via knowing a number that corresponds to the action and then another number to know the values. You can look at the training missions which show the triggers for it in action. I coulda swore there is a definitive place that will tell you what the values correspond to, but I'm not sure where that is. Thanks, so there is no .lua file to look for all specifics. But it can be done (I mean ive seen it work) With X Cockpit Perform Clickable Action? I get 3 options Device Command Value Avioncs plugin With X Set Command to Value.. I get Command Value So i guess Ser Command Value is the right one, and just need to fin the Command and the value A.K.A. Timon -117th- in game
alfredo_laredo Posted April 18, 2018 Author Posted April 18, 2018 Found It! Its in Imput.lua {combos = {{key = "C", reformers = {"LAlt", "LCtrl"}}}, down = 3014, cockpit_device_id = 17, value_down = 1, name = "Open/Close Cargo Doors", category = "Systems"}, X Perform Clickable Action Device 17 Command 3014 Value 1 And the door opens! A.K.A. Timon -117th- in game
slowmover Posted December 28, 2020 Posted December 28, 2020 Hey can you help me do the same? [sIGPIC][/sIGPIC]
HC_Official Posted May 18, 2021 Posted May 18, 2021 @Grimes https://wiki.hoggitworld.com/view/DCS_func_getDrawArgumentValue is there a corresponding set value command in the scripting engine? I was wanting to trigger the cargo doors opening of a mi-8 from a script, is this even possible ? No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. .
Grimes Posted May 18, 2021 Posted May 18, 2021 There is no scripting function for that. 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
HC_Official Posted May 18, 2021 Posted May 18, 2021 (edited) @Grimes thanks for taking the time to reply, would it be possible for you to please add this as a feature request to ED ? Edited May 18, 2021 by HC_Official No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. .
HC_Official Posted May 18, 2021 Posted May 18, 2021 @Grimes I noticed the example code on that page is wrong local u = Unit.getByName('whoopwhoop') if u:getDrawArgumentValue(43) == 1 then -- left gunner door open else -- left gunner door closed end No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. .
Recommended Posts