playerSide defaults to west for JIP players early on during initialization regardless of their side.
So if you are a JIP player on another side (like east), you will need to cater for this for any early initializations.
Also available as Markdown and JSON, or read the original wiki page.
Returns the player's side. This is valid even when the player controlled person is dead (a difference from side player).
Note
playerSide will not change automatically if player joins a group on different side. However, selectPlayer command can and does change playerSide - see #Example 3 for information.
playerSide
Returns: Side
if (side man1 == playerSide) then
{
hint "man1 is on your side!";
};
switch (playerSide) do
{
case west: { hint "You are BLUFOR"; };
case east: { hint "You are OPFOR"; };
};
the following code will change the side of the player including playerSide:
private _player = player;
[player] join createGroup east;
selectNoPlayer;
selectPlayer _player;
hint str playerSide; // EAST
Side · side · west · east · resistance · civilian · sideLogic · sideFriendly · sideEnemy · sideUnknown · sideEmpty · sideAmbientLife · Side Relations
playerSide defaults to west for JIP players early on during initialization regardless of their side.
So if you are a JIP player on another side (like east), you will need to cater for this for any early initializations.
playerSide also shows your starting side, even if your side changes to enemy due to a bad rating. In that case, playerSide != side player.