fixes issue of attacking units getting stuck in zone

This commit is contained in:
spencer-ki 2022-01-09 16:38:15 -08:00
parent eea193bb71
commit 43b17d1b23
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,5 @@
RotorOps = {}
RotorOps.version = "1.0.10"
--RotorOps settings that are safe to change dynamically (ideally from the mission editor in DO SCRIPT for ease of use)
RotorOps.voice_overs = true
@ -29,8 +30,8 @@ RotorOps.ai_red_vehicle_groups = {}
RotorOps.ai_blue_vehicle_groups = {}
RotorOps.ai_tasks = {}
trigger.action.outText("ROTOR OPS STARTED", 5)
env.info("ROTOR OPS STARTED")
trigger.action.outText("ROTOR OPS STARTED: "..RotorOps.version, 5)
env.info("ROTOR OPS STARTED: "..RotorOps.version)
local staged_units --table of ground units that started in the staging zone
local commandDB = {}
@ -438,9 +439,9 @@ function RotorOps.aiExecute(vars)
local last_task = vars.last_task
local group_name = vars.group_name
local task = RotorOps.ai_tasks[group_name].ai_task
local zone = vars.zone
local zone = RotorOps.ai_tasks[group_name].zone
if vars.zone then zone = vars.zone end
-- if vars.zone then zone = vars.zone end
--debugMsg("tasking: "..group_name.." : "..task .." zone:"..zone)
if Group.isExist(Group.getByName(group_name)) ~= true or #Group.getByName(group_name):getUnits() < 1 then

View File

@ -1,5 +1,5 @@
--[[ This is handy for development, so that you don't need to delete and re-add the individual scripts in the ME when you make a change. These will not be packaged with the .miz, so you shouldn't use this script loader for packaging .miz files for other machines/users. You'll want to add each script individually with a DO SCRIPT FILE ]]--
assert(loadfile("C:\\RotorOps\\mist_4_4_90.lua"))()
assert(loadfile("C:\\RotorOps\\Splash_Damage_2_0.lua"))()
assert(loadfile("C:\\RotorOps\\CTLD.lua"))()
assert(loadfile("C:\\RotorOps\\RotorOps.lua"))()
assert(loadfile("C:\\RotorOps\\Splash_Damage_2_0.lua"))()