LaunchUAV

Launch UAV for mission

Usage: Used in 14 task(s)

Lua Implementation

-- Launch UAV
function execute(params)
    local uavSystem = this:getSystem("UAVLauncher")
    local missionType = params.mission_type

    if uavSystem then
        local uav = uavSystem:launchUAV{
            type = params.uav_type or "Recon",
            mission = missionType,
            waypoints = params.waypoints
        }

        if uav then
            this:setStateProperty("LaunchedUAV", uav:getObjectId())
            return true
        end
    end
    return false
end