Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Quick Turnaround Selector

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Quick Turnaround Selector Page: [1]
Login
Message << Older Topic   Newer Topic >>
Quick Turnaround Selector - 6/25/2020 4:48:31 PM   
wqc12345


Posts: 250
Joined: 12/7/2015
From: San Francisco, CA
Status: offline
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.

< Message edited by wqc12345 -- 6/25/2020 5:00:10 PM >
Post #: 1
RE: Quick Turnaround Selector - 6/25/2020 5:59:19 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
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





(in reply to wqc12345)
Post #: 2
RE: Quick Turnaround Selector - 6/25/2020 7:03:30 PM   
wqc12345


Posts: 250
Joined: 12/7/2015
From: San Francisco, CA
Status: offline
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?

(in reply to KnightHawk75)
Post #: 3
RE: Quick Turnaround Selector - 6/26/2020 12:09:03 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
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.


(in reply to wqc12345)
Post #: 4
RE: Quick Turnaround Selector - 6/26/2020 6:56:04 PM   
wqc12345


Posts: 250
Joined: 12/7/2015
From: San Francisco, CA
Status: offline
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.



I've attached my scenario for reference.

Attachment (1)

(in reply to wqc12345)
Post #: 5
RE: Quick Turnaround Selector - 6/27/2020 12:19:17 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
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?






Attachment (1)

< Message edited by KnightHawk75 -- 6/27/2020 12:51:23 AM >

(in reply to wqc12345)
Post #: 6
RE: Quick Turnaround Selector - 6/27/2020 4:42:46 AM   
wqc12345


Posts: 250
Joined: 12/7/2015
From: San Francisco, CA
Status: offline
Thanks Knight. Figured as much.

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

(in reply to KnightHawk75)
Post #: 7
RE: Quick Turnaround Selector - 6/27/2020 5:08:39 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
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.

_____________________________

Michael

(in reply to wqc12345)
Post #: 8
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Quick Turnaround Selector Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.109