[code]-----Objective 1: Bring radio to the cliff top-----
Objective1 = ObjectiveCTF:New{teamATT = ATT, teamDEF = DEF, captureLimit = 1, text = "level.ani.objectives.1_short", popupText = "level.ani.objectives.1_long", AIGoalWeight = 0}
Objective1:AddFlag{name = "radio_flag", homeRegion = "", captureRegion = "radio_flag_drop",
capRegionMarker = "hud_objective_icon", capRegionMarkerScale = 3.0,
mapIcon = "flag_icon", mapIconScale = 2.0}
Objective1.OnStart = function(self)
plans_capture_on = OnFlagPickUp(
function(flag, carrier)
if IsCharacterHuman(carrier) then
MapAddEntityMarker("radio_flag_drop_point", "hud_objective_icon", 4.0, ATT, "YELLOW", true)
end
end,
"radio_flag"
)
plans_capture_off = OnFlagDrop(
function(flag, carrier)
if IsCharacterHuman(carrier) then
MapRemoveEntityMarker("radio_flag_drop_point")
end
end,
"radio_flag"
)
end
Objective1.OnComplete = function (self)
ShowMessageText("game.objectives.complete", ATT)
--RespawnObject("c_cp7")
ReleaseFlagPickUp(plans_capture_on)
ReleaseFlagDrop(plans_capture_off)
MapRemoveEntityMarker("radio_flag_drop_point")
end
[/code]