Quick Turnaround Selector (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


wqc12345 -> Quick Turnaround Selector (6/25/2020 4:48:31 PM)

I'm not sure how the "Enable Quick Turnaround" check box gets selected for a given unit via Lua?

I tried the following:
m = ScenEdit_GetUnit({name='Kimberley #1',side='SA'})
ScenEdit_SetDoctrine({side=m.side, unitname=m.name}, {quick_turnaround_for_aircraft=0, ignore_plotted_course=true})


This does not result in the check box getting selected? Is this even possible in Lua?

update> setting "2" does DISABLE the doctrine for Quick Turnaround, but 0/1 does not select the check-box.




KnightHawk75 -> RE: Quick Turnaround Selector (6/25/2020 5:59:19 PM)

quote:

ORIGINAL: wqc12345

I'm not sure how the "Enable Quick Turnaround" check box gets selected for a given unit via Lua?

I tried the following:
m = ScenEdit_GetUnit({name='Kimberley #1',side='SA'})
ScenEdit_SetDoctrine({side=m.side, unitname=m.name}, {quick_turnaround_for_aircraft=0, ignore_plotted_course=true})


This does not result in the check box getting selected? Is this even possible in Lua?

update> setting "2" does DISABLE the doctrine for Quick Turnaround, but 0/1 does not select the check-box.


You want the box checked meaning you want the editable setting, you can access with the following:

quick_turnaround_for_aircraft_player_editable= true | false








wqc12345 -> RE: Quick Turnaround Selector (6/25/2020 7:03:30 PM)

ok, tried that with just adding it as an attribute to the above code and no joy.

Is this another method? SetUnit? or something else other than doctrine?




KnightHawk75 -> RE: Quick Turnaround Selector (6/26/2020 12:09:03 AM)

Worked perfectly for me, I tried it before posting.
local myunit = SE_GetUnit({guid='4FH7PU-0HM0LV5RLV4JO'})
ScenEdit_SetDoctrine({guid=myunit.guid}, {quick_turnaround_for_aircraft=1})
ScenEdit_SetDoctrine({guid=myunit.guid}, {quick_turnaround_for_aircraft_player_editable=false})
print(ScenEdit_SetDoctrine({guid=myunit.guid,actual=true},{} ))


Set it to Fighters\ASW and Unchecked the previously checked box just as expected.





wqc12345 -> RE: Quick Turnaround Selector (6/26/2020 6:56:04 PM)

Thanks Knight.. again, I'm not saying you are not seeing a check-box clicked, but I'm not.. I run the exact code above on an aircraft with NO mission assigned (please note, NO mission, just sitting ready).. and no check-box is clicked. I pass in the guid and I can get it to disable, but I can never get the check-box to turn on.

[img]https://i.ibb.co/hLF0cxk/Capture.png[/img]

I've attached my scenario for reference.




KnightHawk75 -> RE: Quick Turnaround Selector (6/27/2020 12:19:17 AM)

I'm talking about the checkbox on the WRA screen which is what related to you doing SetDoctrine, your actually asking about a different checkbox on the airops screen. One enables if you can, one enables if you actually are using it. The latter I don't think can be done by lua at the moment, unless there is an undocumented way with setloadout params?

[image]local://upfiles/61096/7617F6C3B9FE40B69FBDFC805BD5E81C.jpg[/image]





wqc12345 -> RE: Quick Turnaround Selector (6/27/2020 4:42:46 AM)

Thanks Knight. Figured as much.

Do you know how to turn on that check box in my screen shot?




michaelm75au -> RE: Quick Turnaround Selector (6/27/2020 5:08:39 AM)

No, that option isn't available in Lua. It actually is on the aircraft so would need to add to the SE_SetUnit() and/or unit wrapper.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.304688