playerSide: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Informative( *)\|" to "{{$1Feature$2|$2Informative$2|") |
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
||
Line 35: | Line 35: | ||
[[hint]] [[str]] [[playerSide]]; {{cc|EAST}}</code> | [[hint]] [[str]] [[playerSide]]; {{cc|EAST}}</code> | ||
| [[Side]], [[side]], [[west]], [[east]], [[resistance]], [[civilian]], [[sideLogic]], [[sideFriendly]], [[sideEnemy]], [[sideUnknown]], [[sideEmpty]], [[sideAmbientLife]], [[Side relations]] | |seealso= [[Side]], [[side]], [[west]], [[east]], [[resistance]], [[civilian]], [[sideLogic]], [[sideFriendly]], [[sideEnemy]], [[sideUnknown]], [[sideEmpty]], [[sideAmbientLife]], [[Side relations]] | ||
}} | }} | ||
Revision as of 23:52, 16 February 2021
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:
- SidesidewesteastresistanceciviliansideLogicsideFriendlysideEnemysideUnknownsideEmptysideAmbientLifeSide relations
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.