strikemission.Strike table is always empty

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
boogabooga
Posts: 1021
Joined: Wed Jul 18, 2018 12:05 am

strikemission.Strike table is always empty

Post by boogabooga »

I'm using the scenario posted here for this example:
https://www.matrixgames.com/forums/view ... 6#p5015226

If I run the following code in the Lua console:

Code: Select all

local x = ScenEdit_GetMission('BlueFor', 'On Call')
print(x.strikemission)
print(x.strikemission.Strike)
I get the following output:

Code: Select all

{ Strike = { }, Escort = { EscortMaxShooter = 'NoPreferences', GroupMemberEngageDistance = 5, EscortMinNonShooter = 'NoPreferences', BoatsToEngage = All, EscortFlightSizeNonShooter = 'Command_Core.Mission+_FlightSize', EscortFlightSizeShooter = 'Command_Core.Mission+_FlightSize', WingmanEngageDistance = 5, BoatsToInvestigate = All, EscortUseFlightSize = 'No', EscortMinShooter = 'NoPreferences', EscortResponseRadius = 80, EscortMaxNonShooter = 'NoPreferences', FlightsToEngage = All, Type = Land_Strike, FlightsToInvestigate = Flight_x1, EscortResponseRadiusSead = 30, EscortGroupSize = 'Command_Core.Mission+_GroupSize' } }
{ }
Notice that the Strike table is empty; I can not access the relevant variables for the strike mission with Lua.

I believe that this bug goes all the way back to CMANO.
The boogabooga doctrine for CMO: Any intentional human intervention needs to be able to completely and reliably over-ride anything that the AI is doing at any time.
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: strikemission.Strike table is always empty

Post by michaelm75au »

There is a specific property to get the target list.

Code: Select all

local x = ScenEdit_GetMission('BlueFor', 'On Call')
print(x.strikemission)
print(x.targetlist)
Please ignore. I misread the post.
Michael
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

Re: strikemission.Strike table is always empty

Post by michaelm75au »

Fixed for the next beta build.
Michael
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

Re: strikemission.Strike table is always empty

Post by KnightHawk75 »

michaelm75au wrote: Sat Sep 17, 2022 2:19 pm Fixed for the next beta build.
Thanks.
Post Reply

Return to “Lua Legion”