SonarContact

Check if sonar has contact

Usage: Used in 2 task(s)

Lua Implementation

-- Sonar Contact
function evaluate(params)
    local sonar = this:getSystem("Sonar")

    if sonar and sonar:getPower() then
        local contacts = sonar:getContacts()
        return contacts and #contacts > 0
    end

    return false
end