This commit is contained in:
Applevangelist 2025-05-15 11:39:42 +02:00
parent 5e45e4a8ec
commit 1231541053
2 changed files with 7 additions and 6 deletions

View File

@ -133,8 +133,7 @@
-- --
-- # 0.1 Set-up in the mission editor -- # 0.1 Set-up in the mission editor
-- --
-- Set up your SAM sites in the mission editor. Name the groups using a systematic approach like above. -- Set up your SAM sites in the mission editor. Name the groups using a systematic approach like above.Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc.
-- Set up your EWR system in the mission editor. Name the groups using a systematic approach like above. Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc.
-- Search Radars usually have "SR" or "STR" in their names. Use the encyclopedia in the mission editor to inform yourself. -- Search Radars usually have "SR" or "STR" in their names. Use the encyclopedia in the mission editor to inform yourself.
-- Set up your SHORAD systems. They need to be **close** to (i.e. around) the SAM sites to be effective. Use **one unit ** per group (multiple groups) for the SAM location. -- Set up your SHORAD systems. They need to be **close** to (i.e. around) the SAM sites to be effective. Use **one unit ** per group (multiple groups) for the SAM location.
-- Else, evasive manoevers might club up all defenders in one place. Red SA-15 TOR systems offer a good missile defense. -- Else, evasive manoevers might club up all defenders in one place. Red SA-15 TOR systems offer a good missile defense.
@ -1036,6 +1035,7 @@ do
-- @return #MANTIS self -- @return #MANTIS self
function MANTIS:SetDLinkCacheTime(seconds) function MANTIS:SetDLinkCacheTime(seconds)
self.DLinkCacheTime = math.abs(seconds or 120) self.DLinkCacheTime = math.abs(seconds or 120)
if self.DLinkCacheTime < 5 then self.DLinkCacheTime = 5 end
return self return self
end end

View File

@ -556,6 +556,7 @@ end
-- @param #PLAYERTASK self -- @param #PLAYERTASK self
-- @param #SET_BASE CaptureSquadGroupNamePrefix The prefix of the group name that needs to capture the zone. -- @param #SET_BASE CaptureSquadGroupNamePrefix The prefix of the group name that needs to capture the zone.
-- @param #number Coalition The coalition that needs to capture the zone. -- @param #number Coalition The coalition that needs to capture the zone.
-- @param #boolean CheckClientInZone If true, a CLIENT assigned to this task also needs to be in the zone for the task to be successful.
-- @return #PLAYERTASK self -- @return #PLAYERTASK self
-- @usage -- @usage
-- -- We can use either STATIC, SET_STATIC, SCENERY or SET_SCENERY as target objects. -- -- We can use either STATIC, SET_STATIC, SCENERY or SET_SCENERY as target objects.
@ -570,20 +571,20 @@ end
-- --
-- -- We set CaptureSquadGroupNamePrefix the group name prefix as set in the ME or the spawn of the group that need to be present at the OpsZone like a capture squad, -- -- We set CaptureSquadGroupNamePrefix the group name prefix as set in the ME or the spawn of the group that need to be present at the OpsZone like a capture squad,
-- -- and set the capturing Coalition in order to trigger a successful task. -- -- and set the capturing Coalition in order to trigger a successful task.
-- mytask:AddOpsZoneCaptureSuccessCondition("capture-squad", coalition.side.BLUE) -- mytask:AddOpsZoneCaptureSuccessCondition("capture-squad", coalition.side.BLUE, false)
-- --
-- playerTaskManager:AddPlayerTaskToQueue(mytask) -- playerTaskManager:AddPlayerTaskToQueue(mytask)
function PLAYERTASK:AddOpsZoneCaptureSuccessCondition(CaptureSquadGroupNamePrefix, Coalition) function PLAYERTASK:AddOpsZoneCaptureSuccessCondition(CaptureSquadGroupNamePrefix, Coalition, CheckClientInZone)
local task = self local task = self
task:AddConditionSuccess( task:AddConditionSuccess(
function(target) function(target)
if target:IsInstanceOf("OPSZONE") then if target:IsInstanceOf("OPSZONE") then
return task:_CheckCaptureOpsZoneSuccess(target, CaptureSquadGroupNamePrefix, Coalition, true) return task:_CheckCaptureOpsZoneSuccess(target, CaptureSquadGroupNamePrefix, Coalition, CheckClientInZone or true)
elseif target:IsInstanceOf("SET_OPSZONE") then elseif target:IsInstanceOf("SET_OPSZONE") then
local successes = 0 local successes = 0
local isClientInZone = false local isClientInZone = false
target:ForEachZone(function(opszone) target:ForEachZone(function(opszone)
if task:_CheckCaptureOpsZoneSuccess(opszone, CaptureSquadGroupNamePrefix, Coalition) then if task:_CheckCaptureOpsZoneSuccess(opszone, CaptureSquadGroupNamePrefix, Coalition, CheckClientInZone or true) then
successes = successes + 1 successes = successes + 1
end end