CommLinkEstablished

Check if communication link is established

Usage: Used in 2 task(s)

Lua Implementation

-- Comm Link Established
function evaluate(params)
    local recipient = params.recipient

    if recipient and recipient:isValid() then
        local range = spatialUtil.distance(this:getLocation3D(), recipient:getLocation3D())
        local maxCommRange = params.max_range or 50000

        return range <= maxCommRange
    end

    return false
end