stilesw -> RE: Scenarios for playtest Nordkapp 1985 (10/4/2018 2:30:32 PM)
|
Ancalagon451, I've done this a couple of times using Lua. First you need to identify the correct No Navigation zone for the side, in this example the side is "Coalition". To determine the ID of the zone you can use this code in the Lua console: local a = VP_GetSide({Side ='Coalition'}) local z = a.nonavzones print(z) Result: { [1] = { description = 'No-Fly Iraq', guid = '1a4b27c0-8046-47aa-874c-061272b8a6d2' }, [2] = { description = 'No-Fly Lebanon', guid = '6b169452-f024-4b4e-8c42-88e945db6d4e' }, [3] = { description = 'No-Fly Syria', guid = '36adbdc7-47ee-467f-961d-0b695f707a4a' }, [4] = { description = 'No-Fly Egypt', guid = 'f6dc7a7b-21b7-448e-bb74-80fe4b536c7d' }, [5] = { description = 'Bunker Zone', guid = '9619cdea-3078-479a-bbe5-b5ea81565b63' } } Say you are interested in the "Bunker Zone" which is [5] for this scenario. This action Lua code will turn the zone on or off. local a = VP_GetSide({Side ='Coalition'}) local z = a.nonavzones local n5 = a : getnonavzone(z[5].guid) n5.isactive = true So, to change the zone status: 1. Create an action (as above). 2. Create a trigger of some sort 3. Create an event that fires when the trigger is met. Hope this helps, -Wayne Stiles
|
|
|
|