BIS fnc objectSide: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "Side relations" to "Side Relations") |
||
(5 intermediate revisions by the same user not shown) | |||
Line 22: | Line 22: | ||
|r2= [[Side]] | |r2= [[Side]] | ||
|x1= < | |x1= <sqf>private _realVehicleSide = [vehicle player, true] call BIS_fnc_objectSide;</sqf> | ||
|x2= < | |x2= <sqf> | ||
_eastSide = | private _unknownSide = [objNull, false] call BIS_fnc_objectSide; // will return sideUnknown | ||
private _eastSide = [objNull, true] call BIS_fnc_objectSide; // will return east | |||
</sqf> | |||
|x3= < | |x3= <sqf> | ||
// 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] | _result3 = [myVehicle, false] call BIS_fnc_objectSide; | ||
</sqf> | |||
|seealso= [[side]] [[CfgVehicles_Config_Reference#side|CfgVehicles config side value]] [[Side]] [[playerSide]] [[west]] [[east]] [[resistance]] [[civilian]] [[sideLogic]] [[sideFriendly]] [[sideEnemy]] [[sideUnknown]] [[sideEmpty]] [[sideAmbientLife]] [[Side | |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]] | ||
}} | }} | ||
{{Note | |||
|user= Tankbuster | |||
|timestamp= 20200401172500 | |||
|text= 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. | |||
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" | The same vehicle, when the boolean parameter is false, will return "UNKNOWN" | ||
}} | |||
Latest revision as of 20:02, 12 June 2023
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:
- Example 2:
- Example 3:
Additional Information
- See also:
- side CfgVehicles config side value Side playerSide west east resistance civilian sideLogic sideFriendly sideEnemy sideUnknown sideEmpty sideAmbientLife Side Relations BIS_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
- Posted on Apr 01, 2020 - 17:25 (UTC)
- 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"