Page 1 of 1

MCM Mission Set-up through LUA script

Posted: Wed Jan 10, 2024 12:28 pm
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.

Re: MCM Mission Set-up through LUA script

Posted: Wed Jan 10, 2024 12:34 pm
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.

Re: MCM Mission Set-up through LUA script

Posted: Wed Jan 10, 2024 12:40 pm
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'}})

Re: MCM Mission Set-up through LUA script

Posted: Fri Jan 12, 2024 7:39 am
by Orzel
Thank you for your support. I believe now the issue is solved.