---
name: "BIS_fnc_setHeight"
type: function
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_setHeight
revid: 349594
updated: 2023-11-13T22:41:43Z
---

# BIS_fnc_setHeight

*Function · Object Manipulation · Arma 3 v0.50 · introduced in Take On Helicopters v1.00*

## Description

Set an object's altitude.

## Syntax

### Syntax 1

```sqf
[target, height, position, mode] call BIS_fnc_setHeight
```

**Parameters:**

- `target`: [Object](../topics/Object.md) - affected object
- `height`: [Number](../topics/Number.md) - (Optional, default 0) height to set
- `position`: [Position](../topics/Position.md) - (Optional, default `position target`) position to place the target with calculated height
- `mode`: [String](../topics/String.md) - (Optional, default "ROADWAY") can be:
  - "ROADWAY": uses [setPos](../commands/setPos.md)
  - "ASL": uses [setPosASL](../commands/setPosASL.md)
  - "ATL": uses [setPosATL](../commands/setPosATL.md)

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) when done

### Syntax 2

```sqf
[height, mode] call BIS_fnc_setHeight > [!IMPORTANT] > This syntax uses `this` and is therefore meant to be used in init fields. Not to be used in MP.
```

**Parameters:**

- `height`: [Number](../topics/Number.md) - (Optional, default 0) height to set
- `mode`: [String](../topics/String.md) - (Optional, default "ROADWAY") can be:
  - "ROADWAY": uses [setPos](../commands/setPos.md)
  - "ASL": uses [setPosASL](../commands/setPosASL.md)
  - "ATL": uses [setPosATL](../commands/setPosATL.md)

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) when done

## Examples

### Example 1

```sqf
// will place player's vehicle on "myHeightMarker", 50m above terrain
[vehicle player, 50, getMarkerPos "myHeightMarker", "ATL"] call BIS_fnc_setHeight;
```

### Example 2

```sqf
// will set the "this" object 50m above sea level at its position
// use where "this" has a value like in an init field
[50, "ASL"] call BIS_fnc_setHeight;
```

## See also

[setPos](../commands/setPos.md) · [setPosASL](../commands/setPosASL.md) · [setPosATL](../commands/setPosATL.md)

<sub>Source: [BI Community Wiki — BIS fnc setHeight](https://community.bistudio.com/wiki/BIS_fnc_setHeight) (revision 349594).</sub>
