Page 1 of 1

ScenEdit_SetZone (sideName, zoneType, table)

Posted: Sat Jun 22, 2019 10:41 am
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

RE: ScenEdit_SetZone (sideName, zoneType, table)

Posted: Sat Jun 22, 2019 8:58 pm
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

RE: ScenEdit_SetZone (sideName, zoneType, table)

Posted: Sat Jun 22, 2019 11:15 pm
by AdmiralSteve
Thank you kindly sir. I greatly appreciate your time.

Steve