Un-assign Mission?

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
User avatar
BeirutDude
Posts: 2799
Joined: Sat Apr 27, 2013 9:44 am
Location: Jacksonville, FL, USA

Un-assign Mission?

Post by BeirutDude »

OK, so I'm designing my first Scenario utilizing Lau scripting and I'm using the assign mission script to allow a strike mission to form up and then launch the strike in some type of order, rather than more strung out. So first I'm sending the aircraft into a formation box (1 degree by 1 degree) to form up & tank and then assigning them to a strike mission at a certain time. That's easy but I also want the strikes to occur over multiple days so would like to unassign and then reassign the aircraft to missions. SOOOOOOO, is there a way to have them drop out of the mission upon return to base or should I just set up multiple one time missions for each day? The latter is likely the route I will go but just wondering if I can do this with just one mission per mission type?

Al
"Some people spend an entire lifetime wondering if they made a difference. The Marines don't have that problem."
PRESIDENT RONALD REAGAN, 1985

I was Navy, but Assigned TAD to the 24th MAU Hq in Beirut. By far the finest period of my service!
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Un-assign Mission?

Post by michaelm75au »

Suggestion:
Have a timed event that checks the units assigned to the active strike mission. If the unit status is not flying or ready, then clear the 'mission' property on the unit. Or just if the status is RTB, clear it then.
Michael
AlphaSierra
Posts: 132
Joined: Mon Feb 13, 2017 9:35 am

RE: Un-assign Mission?

Post by AlphaSierra »

If ScenEdit_AssignUnitToMission('PLAN SAG 1', 'Kill The Carrier')

Assigns a (Group in this case) to mission 'kill the carrier'
Note: *watch spelling and case

ScenEdit_AssignUnitToMission('PLAN SAG 1', '')

Assigns that same group to no mission
I wish to have no connection with any ship that does not sail fast; for I intend to go in harm's way. -John Paul Jones
Post Reply

Return to “Lua Legion”