MCM Mission Set-up through LUA script

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
Orzel
Posts: 8
Joined: Wed Jan 10, 2024 12:20 pm

MCM Mission Set-up through LUA script

Post by Orzel »

Hi,
I come to you with questions about the LUA script in context of setting up the MCM mission. I would like to create this mission solely using LUA code and currently my main problem is related to the syntax of the commands.

Current Script:
ScenEdit_AddReferencePoint({side='Blue', name='ref1', lat='N51.31.11', lon='E3.25.24', highlighted=true})
ScenEdit_AddReferencePoint({side='Blue', name='ref2', lat='N51.27.15', lon='E3.31.13', highlighted=true})
ScenEdit_AddReferencePoint({side='Blue', name='ref3', lat='N51.25.07', lon='E3.30.31', highlighted=true})
ScenEdit_AddReferencePoint({side='Blue', name='ref4', lat='N51.24.03', lon='E3.21.05', highlighted=true})
ScenEdit_AddMission('Blue', 'MineSweep', 'MineClearing', {area={'ref1','ref2','ref3','ref4'}})

However, the game seems unable to correctly interpret the area of operations limited by the reference points. From my understanding, this issue is connected to improper syntax of the 'AddMission" command. Unfortunately, I haven't been able to find any guidance that could steer me in the right direction.

Thank you in advance for your advices.
thewood1
Posts: 9932
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

Re: MCM Mission Set-up through LUA script

Post by thewood1 »

Have you asked or looked here?

https://www.matrixgames.com/forums/view ... hp?f=10236

Might get someone with lua expertise to take a look.
User avatar
lumiere
Posts: 267
Joined: Tue Mar 19, 2019 10:38 am

Re: MCM Mission Set-up through LUA script

Post by lumiere »

Mission area option should be "zone" instead of "area".
https://commandlua.github.io/assets/Fun ... ssion.html
ScenEdit_AddMission('Blue', 'MineSweep', 'MineClearing', {zone={'ref1','ref2','ref3','ref4'}})
"How Do You Stay Calm With A 7,000 Ton Nuclear Predator Listening For Your Heartbeat?"
Orzel
Posts: 8
Joined: Wed Jan 10, 2024 12:20 pm

Re: MCM Mission Set-up through LUA script

Post by Orzel »

Thank you for your support. I believe now the issue is solved.
Post Reply

Return to “Lua Legion”