BIS fnc objectSide: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Alternative Syntax " to "|Alternative Syntax= ") |
Lou Montana (talk | contribs) m (Text replacement - " <nowiki>[</nowiki>" to " [<nowiki/>") |
||
Line 27: | Line 27: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_realVehicleSide = <nowiki | |x1= <code>_realVehicleSide = [<nowiki/>[[vehicle]] [[player]], [[true]]] [[call]] [[BIS_fnc_objectSide]];</code> |EXAMPLE1= | ||
|x2= <code>_unknownSide = <nowiki | |x2= <code>_unknownSide = [<nowiki/>'''[[objNull]]''', [[false]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[sideUnknown]]}} | ||
_eastSide = <nowiki | _eastSide = [<nowiki/>'''[[objNull]]''', [[true]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[east]]}}</code> |EXAMPLE2= | ||
|x3= <code>{{codecomment|// same results}} | |x3= <code>{{codecomment|// same results}} |
Revision as of 13:16, 19 March 2020
Description
- Description:
- Returns object side as defined in config (i.e. not affected by dynamic changing like rating)
- Execution:
- call
- Groups:
- Uncategorised
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