[code] --==========================
-- ACTIVATE HANGAR CONSOLE
--==========================
-- Objective 1: Activate the console
Objective1 = Objective:New{teamATT = ATT, teamDEF = DEF,
text = "level.eur.objectives.1",
popupText = "level.eur.objectives.1_popup",
multiplayerRules = false }
Objective1.OnStart = function(self)
MapAddEntityMarker("hangar_console", "hud_objective_icon", 3.0, ATT, "YELLOW", true)
local CZ_Hangar = OnObjectRepairName(
function(objPtr, characterId)
-- Test output
print("EURn_c.CZ_Hangar: Activated console")
ShowMessageText("level.EUR.interactions.test.received")
MapRemoveEntityMarker("hangar_console")
-- Complete the objective so we can move on to the next one
Objective1:Complete(ATT)
-- Disable this combat zone's trigger
ReleaseObjectRepair(CZ_Hangar)
CZ_Hangar = nil
end,
"hangar_console"
)
end
Objective1.OnComplete = function(self)
--BroadcastVoiceOver("GEO_obj_59", ATT)
ShowMessageText("game.objectives.complete", ATT)
end
--==========================
-- COMBAT ZONE : S0 -- HANGAR
--==========================
-- Objective 2: Secure the hangar
Objective2 = Objective:New{teamATT = ATT, teamDEF = DEF,
text = "level.eur.objectives.2",
popupText = "level.eur.objectives.2_popup",
multiplayerRules = false }
Objective2.OnStart = function(self)
HangarCaptured = OnFinishCaptureName(
function(postPtr)
if GetObjectTeam(postPtr) ~= ATT then
-- Complete the objective, ending the game if this is final objective
Objective2:Complete(ATT)
-- Stop listening for OnFinishCaptureName()
ReleaseFinishCapture(HangarCaptured )
HangarCaptured = nil
end
end,
"cp1"
)
end
Objective2.OnComplete = function(self)
--BroadcastVoiceOver("GEO_obj_59", ATT)
ShowMessageText("game.objectives.complete", ATT)
end[/code]