EstablishDefensivePosition

Establish defensive position

Usage: Used in 13 task(s)

Lua Implementation

-- Establish Defensive Position
function execute(params)
    local position = params.position
    local orientation = params.orientation or params.threat_bearing

    this:addTask("DtGoto", {location = position})

    if orientation then
        this:setOrientation(orientation, this:getPitch(), this:getRoll())
    end

    this:setStateProperty("CombatPosture", "defensive")
    this:setStateProperty("DefensivePosition", position)

    return true
end