BIS fnc objectSide: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
| 1.00 | | 1.00 | ||
|gr1 = Sides | |gr1 = Sides | ||
| Returns object side as defined in config (i.e. not affected by dynamic changing like rating) | | Returns object side as defined in config (i.e. not affected by dynamic changing like rating) | ||
| [target, boolean] call [[BIS_fnc_objectSide]] | | [target, boolean] call [[BIS_fnc_objectSide]] | ||
|p1= target: [[Object]] - the object to be tested | |p1= target: [[Object]] - the object to be tested | ||
|p2= boolean: [[Boolean]] (optional) - false (default) to return actual object side, true to return the default config value | |p2= boolean: [[Boolean]] (optional) - false (default) to return actual object side, true to return the default config value | ||
| [[Side]] | | [[Side]] | ||
|s2= target call [[BIS_fnc_objectSide]] | |s2= target call [[BIS_fnc_objectSide]] | ||
|p21= target: [[Object]] - the object to be tested. This syntax is equal to calling the method with [[false]] as a second parameter. | |p21= target: [[Object]] - the object to be tested. This syntax is equal to calling the method with [[false]] as a second parameter. | ||
Line 24: | Line 24: | ||
|x1= <code>_realVehicleSide = [<nowiki/>[[vehicle]] [[player]], [[true]]] [[call]] [[BIS_fnc_objectSide]];</code> | |x1= <code>_realVehicleSide = [<nowiki/>[[vehicle]] [[player]], [[true]]] [[call]] [[BIS_fnc_objectSide]];</code> | ||
|x2= <code>_unknownSide = [<nowiki/>'''[[objNull]]''', [[false]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[sideUnknown]]}} | |x2= <code>_unknownSide = [<nowiki/>'''[[objNull]]''', [[false]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[sideUnknown]]}} | ||
_eastSide = [<nowiki/>'''[[objNull]]''', [[true]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[east]]}}</code> | _eastSide = [<nowiki/>'''[[objNull]]''', [[true]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[east]]}}</code> | ||
|x3= <code>{{codecomment|// same results}} | |x3= <code>{{codecomment|// same results}} | ||
_result1 = myVehicle [[call]] [[BIS_fnc_objectSide]]; | _result1 = myVehicle [[call]] [[BIS_fnc_objectSide]]; | ||
_result2 = [myVehicle] [[call]] [[BIS_fnc_objectSide]]; | _result2 = [myVehicle] [[call]] [[BIS_fnc_objectSide]]; | ||
_result3 = [myVehicle, false] [[call]] [[BIS_fnc_objectSide]];</code> | _result3 = [myVehicle, false] [[call]] [[BIS_fnc_objectSide]];</code> | ||
| [[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]] | | [[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]] | ||
}} | }} |
Revision as of 23:38, 17 January 2021
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
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"