From 19073534dd8e25d0da1b0cc7b27e4fc090453a1f Mon Sep 17 00:00:00 2001 From: Shafik Date: Mon, 11 Nov 2024 12:45:25 +0200 Subject: [PATCH] Docs update for: PLAYERTASK:AddReconSuccessCondition --- Moose Development/Moose/Ops/PlayerTask.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Ops/PlayerTask.lua b/Moose Development/Moose/Ops/PlayerTask.lua index 1d13908b6..4f6e3a257 100644 --- a/Moose Development/Moose/Ops/PlayerTask.lua +++ b/Moose Development/Moose/Ops/PlayerTask.lua @@ -500,14 +500,15 @@ function PLAYERTASK:AddStaticObjectSuccessCondition() end --- [USER] Adds task success condition for AUFTRAG.Type.RECON when a client is at a certain LOS distance from the target. --- @param #number maxDistance Minimum distance from client to target in LOS for success condition. (Default 5 NM) +-- @param #PLAYERTASK self +-- @param #number MinDistance Minimum distance in meters from client to target in LOS for success condition. (Default 5 NM) -- @return #PLAYERTASK self -function PLAYERTASK:AddReconSuccessCondition(minDistance) +function PLAYERTASK:AddReconSuccessCondition(MinDistance) local task = self task:AddConditionSuccess( function(target) local targetLocation = target:GetCoordinate() - local minD = minDistance or UTILS.NMToMeters(5) + local minD = MinDistance or UTILS.NMToMeters(5) for _, client in ipairs(task:GetClientObjects()) do local clientCoord = client:GetCoordinate() local distance = clientCoord:Get2DDistance(targetLocation)