ScenEdit_SetZone (sideName, zoneType, table)

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
AdmiralSteve
Posts: 288
Joined: Mon Mar 28, 2011 2:32 pm
Location: Red Bluff, CA

ScenEdit_SetZone (sideName, zoneType, table)

Post by AdmiralSteve »

I'm wanting to have two exclusion zone made but not active and want them to go active once a particular event occurs yet I cannot figure out how to the get this script to work. Any help is greatly appreciated.

ScenEdit_SetZone (sideName, zoneType, table)

Thank you,

Steve
“There are no extraordinary men...just extraordinary circumstances that ordinary men are forced to deal with.”
Admiral William Frederick Halsey Jr. 1882-1959

User avatar
michaelm75au
Posts: 12464
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: ScenEdit_SetZone (sideName, zoneType, table)

Post by michaelm75au »

ScenEdit_SetZone('NATO', 1, {description='Zone 1',isactive=1})

Note that the 'description' is case sensitive. You can also use the GUID of the zone if you know it rather than 'description'.
ScenEdit_SetZone('NATO', 1, {guid='e8972385-551e-4617-b197-a74a20c6e51b',isactive=1})

The older method to do same thing still exists
local a = VP_GetSide({Side ='nato'}) -- a side object
local z = a.exclusionzones --List of zones for the side if you need to find it
local n = a : getexclusionzone('Zone 1') -- required zone object for a particular zone
n.isactive = true-- turn it on
Michael
User avatar
AdmiralSteve
Posts: 288
Joined: Mon Mar 28, 2011 2:32 pm
Location: Red Bluff, CA

RE: ScenEdit_SetZone (sideName, zoneType, table)

Post by AdmiralSteve »

Thank you kindly sir. I greatly appreciate your time.

Steve
“There are no extraordinary men...just extraordinary circumstances that ordinary men are forced to deal with.”
Admiral William Frederick Halsey Jr. 1882-1959

Post Reply

Return to “Lua Legion”