BIS fnc objectSide: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page refactor)
Line 5: Line 5:
| arma3 |= Game name
| arma3 |= Game name


|1.00|= Game version
| 1.00 |= Game version
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Returns object side as defined in config (i.e. not affected by dynamic changing like rating) |= Description
____________________________________________________________________________________________


Description:
| [target, boolean] call [[BIS_fnc_objectSide]] |= Syntax
Returns object side as defined in config (i.e., not affected by dynamic changing)


Parameter(s):
|p1= target: [[Object]] - the object to be tested |= Parameter 1
0: OBJECT
1: BOOL - false (default) to return actual object side, true to return the default one (set in config)


Returns:
|p2= boolean: [[Boolean]] (optional) - false (default) to return actual object side, true to return the default config value |= Parameter 2
SIDE
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
| [[Side]] |= Return value
____________________________________________________________________________________________
 
|s2= target call [[BIS_fnc_objectSide]] |= Alternative Syntax


| <!-- [] call [[BIS_fnc_objectSide]]; --> |= Syntax
|p21= target: [[Object]] - the object to be tested. This syntax is equal to calling the method with [[false]] as a second parameter.


|p1= |= Parameter 1
|r2= [[Side]] |= Alternative return value


| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>_realVehicleSide = <nowiki>[</nowiki>[[vehicle]] [[player]], [[true]]] [[call]] [[BIS_fnc_objectSide]];</code> |= Example 1
 
|x2= <code>_unknownSide = <nowiki>[</nowiki>'''[[objNull]]''', [[false]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[sideUnknown]]}}
_eastSide    = <nowiki>[</nowiki>'''[[objNull]]''',  [[true]]] [[call]] [[BIS_fnc_objectSide]]; {{codecomment|// will return [[east]]}}</code> |= Example 2
 
|x3= <code>{{codecomment|// same results}}
_result1 = myVehicle [[call]] [[BIS_fnc_objectSide]];
_result2 = [myVehicle] [[call]] [[BIS_fnc_objectSide]];
_result3 = [myVehicle, false] [[call]] [[BIS_fnc_objectSide]];</code> |= Example 3
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[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]] |= See also


}}
}}

Revision as of 13:03, 25 March 2018


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:
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

Notes

Bottom Section