mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Made user exits for Mission Completion evaluation...
Man, this is going to rock!
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -32,3 +32,14 @@ local FACAreas = DETECTION_UNITS:New( FACSet )
|
||||
local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart()
|
||||
local TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, HQ, AttackGroups, FACAreas )
|
||||
|
||||
|
||||
-- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004.
|
||||
-- This is just an example, but many more examples can follow...
|
||||
function Mission:OnBeforeComplete( From, Event, To )
|
||||
local Group004 = GROUP:FindByName( "Target #004" )
|
||||
if Group004:IsAlive() == false then
|
||||
Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" )
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
Reference in New Issue
Block a user