pacastro Posted July 19, 2020 Posted July 19, 2020 (edited) Hi, I'm trying to use MOOSE AIRBASE wrapper to identify the closest enemy (red) base (reference to drone at krymsk) and set an AI Task for the "Drone_1" group. Tasks are defined for the group and works OK when pushed through ME triggers. I'm using the following code, but its not pushing the AITask: local krasnodar = AIRBASE:FindByName("Krasnodar-Center") local maykop = AIRBASE:FindByName("Maykop-Khanskaya") local sochi = AIRBASE:FindByName("Sochi-Adler") local gudauta = AIRBASE:FindByName("Gudauta") local sukhumi = AIRBASE:FindByName("Sukhumi-Babushara") local senaki = AIRBASE:FindByName("Senaki-Kolkhi") if krasnodar:GetCoalition()==coalition.side.RED then trigger.action.pushAITask("DRONE_1", 1) elseif maykop:GetCoalition()==coalition.side.RED then trigger.action.pushAITask("DRONE_1", 2) elseif sochi:GetCoalition()==coalition.side.RED then trigger.action.pushAITask("DRONE_1", 3) elseif gudauta:GetCoalition()==coalition.side.RED then trigger.action.pushAITask("DRONE_1", 4) elseif sukhumi:GetCoalition()==coalition.side.RED then trigger.action.pushAITask("DRONE_1", 5) elseif senaki:GetCoalition()==coalition.side.RED then trigger.action.pushAITask("DRONE_1", 6) end Any idea what is my mistake?? Thanks Edited July 19, 2020 by pacastro
Recommended Posts