---
name: "joinAs"
type: command
status: ok
groups: ["Groups"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/joinAs
revid: 330016
updated: 2022-08-15T14:38:07Z
---

# joinAs

*Command · Groups · Arma 3 v0.50 · introduced in Arma 2 v1.00*

Locality: arguments **global** · effect **global**

## Description

Joins the unit to the given group, if position id is available, this one is used.

## Syntax

```sqf
unit joinAs [group, id]
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `group`: [Group](../topics/Group.md)
- `id`: [Number](../topics/Number.md)

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

## Examples

### Example 1

```sqf
player joinAs [_group, 4];
```

### Example 2

To get the position id:

```sqf
getUnitPositionId = {
    private ["_vvn", "_str"];
    _vvn = vehicleVarName _this;
    _this setVehicleVarName "";
    _str = str _this;
    _this setVehicleVarName _vvn;
    parseNumber (_str select [(_str find ":") + 1])
};
player joinAs [createGroup west, 5];
_id = player call getUnitPositionId;
hint str _id; // 5
```

## See also

[join](../commands/join.md) · [joinAsSilent](../commands/joinAsSilent.md) · [joinSilent](../commands/joinSilent.md) · [group](../commands/group.md)

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