MOOSE_MISSIONS/Wrapper/Group/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua
2024-01-01 22:24:29 +00:00

30 lines
700 B
Lua

--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
local HeliGroup = GROUP:FindByName( "Helicopter" )
local AttackGroup = GROUP:FindByName( "AttackGroup" )
local AttackUnits = AttackGroup:GetUnits()
local Tasks = {}
for i = 1, #AttackUnits do
local AttackUnit = AttackGroup:GetUnit( i )
Tasks[#Tasks+1] = HeliGroup:TaskAttackUnit( AttackUnit )
end
Tasks[#Tasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } )
--- @param Wrapper.Group#GROUP HeliGroup
function _Resume( HeliGroup )
env.info( '_Resume' )
HeliGroup:MessageToAll( "Resuming",10,"Info")
end
HeliGroup:PushTask(
HeliGroup:TaskCombo(
Tasks
), 30
)