Lua help with mission activation

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
User avatar
Gunner98
Posts: 5974
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

Lua help with mission activation

Post by Gunner98 »

Hay guys

Haven't done Lua for a while:

As part of a Special Action, I want to give the player an option to activate an airstrike on an allied side.

I was thinking that this should work:

ScenEdit_SetMission ('NATO','Akureyri Strike', {isactive=True})

Although the syntax is fine, it does not do the trick. Any ideas, I'm probably missing something quite simple.

Thanks

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
User avatar
stilesw
Posts: 1572
Joined: Wed Jun 25, 2014 10:08 pm
Location: Hansville, WA, USA

RE: Lua help with mission activation

Post by stilesw »

Gunnar,

Well, this works for me:
local mission = ScenEdit_SetMission ('Coalition','AEW Daharan',{isactive=true})

The only difference I see is the "local mission =" and using a lower case "true". Hope it helps.

-Wayne Stiles
“There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.”

Charles Edward Montague, English novelist and essayist
~Disenchantment, ch. 15 (1922)
User avatar
Gunner98
Posts: 5974
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Lua help with mission activation

Post by Gunner98 »

Worked like a charm Wayne - thanks.

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
Post Reply

Return to “Lua Legion”