mirror of
https://github.com/iTracerFacer/DCS_MissionDev.git
synced 2025-12-03 04:14:46 +00:00
35 lines
1.2 KiB
Lua
35 lines
1.2 KiB
Lua
---
|
|
-- Name: TAD-CGO-000 - CSAR Test
|
|
-- Author: FlightControl
|
|
-- Date Created: 31 Mar 2018
|
|
--
|
|
-- # Situation:
|
|
--
|
|
-- This mission demonstrates the dynamic task dispatching for cargo CSAR operations.
|
|
--
|
|
|
|
HQ = GROUP:FindByName( "HQ", "Bravo" )
|
|
|
|
CommandCenter = COMMANDCENTER
|
|
:New( HQ, "Lima" )
|
|
|
|
Mission = MISSION
|
|
:New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.BLUE )
|
|
|
|
AttackGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Rescue" ):FilterStart()
|
|
|
|
TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups )
|
|
|
|
TaskDispatcher:StartCSARTasks(
|
|
"CSAR",
|
|
{ ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) },
|
|
"One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" ..
|
|
"Use the radio menu to let the command center assist you with the CSAR tasking."
|
|
)
|
|
|
|
function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone )
|
|
|
|
MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll()
|
|
|
|
end
|