BIS fnc objectSide: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Sides(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 7: Line 6:


|gr1 = Sides |GROUP1=
|gr1 = Sides |GROUP1=
____________________________________________________________________________________________


| Returns object side as defined in config (i.e. not affected by dynamic changing like rating) |DESCRIPTION=
| Returns object side as defined in config (i.e. not affected by dynamic changing like rating) |DESCRIPTION=
____________________________________________________________________________________________


| [target, boolean] call [[BIS_fnc_objectSide]] |SYNTAX=
| [target, boolean] call [[BIS_fnc_objectSide]] |SYNTAX=
Line 26: Line 23:
|r2= [[Side]] |= Alternative return value
|r2= [[Side]] |= Alternative return value


____________________________________________________________________________________________


|x1= <code>_realVehicleSide = [<nowiki/>[[vehicle]] [[player]], [[true]]] [[call]] [[BIS_fnc_objectSide]];</code> |EXAMPLE1=
|x1= <code>_realVehicleSide = [<nowiki/>[[vehicle]] [[player]], [[true]]] [[call]] [[BIS_fnc_objectSide]];</code> |EXAMPLE1=
Line 37: Line 33:
_result2 = [myVehicle] [[call]] [[BIS_fnc_objectSide]];
_result2 = [myVehicle] [[call]] [[BIS_fnc_objectSide]];
_result3 = [myVehicle, false] [[call]] [[BIS_fnc_objectSide]];</code> |EXAMPLE3=
_result3 = [myVehicle, false] [[call]] [[BIS_fnc_objectSide]];</code> |EXAMPLE3=
____________________________________________________________________________________________


| [[side]], [[CfgVehicles_Config_Reference#side|CfgVehicles config side value]], [[Side]], [[playerSide]], [[west]], [[east]], [[resistance]], [[civilian]], [[sideLogic]], [[sideFriendly]], [[sideEnemy]], [[sideUnknown]], [[sideEmpty]], [[sideAmbientLife]], [[Side relations]], [[BIS_fnc_sideID]] |SEEALSO=
| [[side]], [[CfgVehicles_Config_Reference#side|CfgVehicles config side value]], [[Side]], [[playerSide]], [[west]], [[east]], [[resistance]], [[civilian]], [[sideLogic]], [[sideFriendly]], [[sideEnemy]], [[sideUnknown]], [[sideEmpty]], [[sideAmbientLife]], [[Side relations]], [[BIS_fnc_sideID]] |SEEALSO=

Revision as of 00:26, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns object side as defined in config (i.e. not affected by dynamic changing like rating)
Execution:
call
Groups:
Sides

Syntax

Syntax:
[target, boolean] call BIS_fnc_objectSide
Parameters:
target: Object - the object to be tested
boolean: Boolean (optional) - false (default) to return actual object side, true to return the default config value
Return Value:
Side

Alternative Syntax

Syntax:
target call BIS_fnc_objectSide
Parameters:
target: Object - the object to be tested. This syntax is equal to calling the method with false as a second parameter.
Return Value:
Side

Examples

Example 1:
_realVehicleSide = [vehicle player, true] call BIS_fnc_objectSide;
Example 2:
_unknownSide = [objNull, false] call BIS_fnc_objectSide; // will return sideUnknown _eastSide = [objNull, true] call BIS_fnc_objectSide; // will return east
Example 3:
// same results _result1 = myVehicle call BIS_fnc_objectSide; _result2 = [myVehicle] call BIS_fnc_objectSide; _result3 = [myVehicle, false] call BIS_fnc_objectSide;

Additional Information

See also:
sideCfgVehicles config side valueSideplayerSidewesteastresistanceciviliansideLogicsideFriendlysideEnemysideUnknownsideEmptysideAmbientLifeSide relationsBIS_fnc_sideID

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

Notes

Bottom Section

Posted on April 1, 2020 - 17:25 (UTC)
Tankbuster
When using this to get the side of vehicle drivers, be aware that when the boolean parameter is true, empty vehicles will return their driver as east. The same vehicle, when the boolean parameter is false, will return "UNKNOWN"