Page 1 of 1

Remove No-Navigation Zone with LUA

Posted: Fri Apr 15, 2022 6:51 pm
by tmoilanen
Hi - I'm trying to remove a No-Navigation zone via Lua script and can't seem to find the correct syntax in the docs.

Below is code that I have tried, but if I have multiple No-Nav zones defined it will delete 1 zone, and not necessarily the one which is specified my the zone variable.

Any assistance would be appreciated...tm

Code: Select all

local myside = {'NATO'}
local myzone = {'Kaliningrad'}

for s = 1,#myside
do

local side = myside[s]

for z = 1, #myzone
do

zone = myzone[z] .." No-Nav Zone"

ScenEdit_RemoveZone(side,0,{zone})

end
end

Re: Remove No-Navigation Zone with LUA

Posted: Sun Apr 17, 2022 2:00 am
by KnightHawk75
All you should need "IF" you know the side and name of the zone you should not need all the rest just:

ScenEdit_RemoveZone('NATO',0,{Description="Kaliningrad"});

Be aware the related RP's generally speaking remain (you're just deleting the zone using them).