Arma 3 Scripting

setSide

  • Arma 3 v0.50
  • First in Armed Assault v1.08

Command · also in Locations · Markdown · JSON · original wiki page

Description

Sets a location's side. The default side is Unknown.

Important

To change a unit's side, see #Notes.

Syntax

location setSide side

Parameters:

Returns: Nothing

Examples

Example 1

_myLocation setSide resistance;

See also

Side · side · west · east · resistance · civilian · sideUnknown · sideFriendly · sideEnemy · playerSide · Side Relations · independent

Community notes

Ondřejkuzel

For units, vehicles you can use: _unitsArray joinSilent createGroup _side, e.g. in init: [this] joinSilent createGroup EAST; described in the note below

Jtgibson

This is a frequent question on OFPEC, but produced here because it was difficult to find an answer to. setSide does not work for men, vehicles, etc.: it is intended for locations (i.e., territory). If you want to switch a unit's (e.g., the player's) side in the middle of a battle, make the unit joinSilent a group on the given side instead. If you want the unit to become the group leader after joining, use selectLeader. I have not tested the idea of spawning a temporary unit of that side, assigning the player to that unit, setting the player as the leader, then deleting the original unit, but I don't see why it wouldn't work. (It begs the question why we don't have a setSide object function, though.)