playerSide: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Text replacement - "<dd class="notedate">Posted on ([^<>]+) " to "<dd class="notedate">Posted on $1</dd> ")
Line 41: Line 41:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on 27 Jan, 2008
<dd class="notedate">Posted on 27 Jan, 2008</dd>
<dt class="note">[[User:Dr_Eyeball|Dr_Eyeball]]<dd class="note">
<dt class="note">[[User:Dr_Eyeball|Dr_Eyeball]]<dd class="note">
[[playerSide]] defaults to [[west]] for JIP players early on during initialization regardless of their side.<br>
[[playerSide]] defaults to [[west]] for JIP players early on during initialization regardless of their side.<br>
So if you are a JIP player on another side (like [[east]]), you will need to cater for this for any early initializations.
So if you are a JIP player on another side (like [[east]]), you will need to cater for this for any early initializations.


<dd class="notedate">Posted on 13 Oct, 2008
<dd class="notedate">Posted on 13 Oct, 2008</dd>
<dt class="note">[[User:Dr_Eyeball|Dr_Eyeball]]<dd class="note">
<dt class="note">[[User:Dr_Eyeball|Dr_Eyeball]]<dd class="note">
[[playerSide]] also shows your starting side, even if your [[side]] changes to [[enemy]] due to a bad [[rating]]. In that case, playerSide != side player.
[[playerSide]] also shows your starting side, even if your [[side]] changes to [[enemy]] due to a bad [[rating]]. In that case, playerSide != side player.

Revision as of 01:01, 30 January 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Sides

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:
if (side man1 == playerSide) then { hint "man1 is on your side!"; };
Example 2:
switch (playerSide) do { case west: { hint "You are BLUFOR"; }; case east: { hint "You are OPFOR"; }; };
Example 3:
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

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on 27 Jan, 2008
Dr_Eyeball
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.
Posted on 13 Oct, 2008
Dr_Eyeball
playerSide also shows your starting side, even if your side changes to enemy due to a bad rating. In that case, playerSide != side player.