---
name: "limitSpeed"
type: command
status: ok
groups: ["Unit Control", "Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/limitSpeed
revid: 378640
updated: 2026-05-15T17:05:16Z
---

# limitSpeed

*Command · Unit Control, Object Manipulation · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Limit the speed of an AI-driven vehicle or AI person to given value. It has continuous effect and AI will not break through the speed limitation until one is contacted, engaged or regrouped.

## Syntax

```sqf
objectName limitSpeed speed
```

**Parameters:**

- `objectName`: [Object](../topics/Object.md)
- `speed`: [Number](../topics/Number.md) (or [Boolean](../topics/Boolean.md) since Arma 3 2.22) - in km/h; By default, it's `2 * maxSpeed` of the vehicle/unit (which is defined in config). See Example 1.

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
leader player limitSpeed 5;        // set to walking speed
sleep 30;
leader player limitSpeed (2 * getNumber(configOf leader player >> "maxSpeed"));    // remove the limit
```

### Example 2

```sqf
addMissionEventHandler ["OnEachFrame", { hintSilent format ["myVehicle's speed: %1 km/h", speed myVehicle toFixed 2] }];
sleep 5;
myVehicle limitSpeed 5;
```

### Example 3

```sqf
// it was necessary to use limitSpeed repeatedly before Arma 3 1.24
_this setVariable ["speedLimit", 50];
_this spawn {
    while { sleep 0.1; canMove _this } do
    {
        _this limitSpeed (_this getVariable "speedLimit");
    };
};
sleep 10;
_this setVariable ["speedLimit", 100]; // update the speed limit
```

### Example 4

Since Arma 3 2.22: 

```sqf
_heli limitSpeed false; // reset to default
```

## Problems

Since Take On Helicopters v1.00 and as of Arma 3 v2.14, using any negative value on a helicopter will not reset the speed limit, but will force it to fly in reverse.

## See also

[speed](../commands/speed.md) · [setCruiseControl](../commands/setCruiseControl.md) · [forceSpeed](../commands/forceSpeed.md)

<sub>Source: [BI Community Wiki — limitSpeed](https://community.bistudio.com/wiki/limitSpeed) (revision 378640).</sub>
