BIS fnc sideIsEnemy: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(12 intermediate revisions by the same user not shown)
Line 6: Line 6:
|gr1= Sides
|gr1= Sides


|descr= Determines if side B is enemy to side A the way the game engine does it. The relationship table can be found here:  [[Side relations]].
|descr= Determines if side B is enemy to side A the way the game engine does it. The relationship table can be found here:  [[Side Relations]].


|s1= [sideA, sideB] call [[BIS_fnc_sideIsEnemy]]
|s1= [sideA, sideB] call [[BIS_fnc_sideIsEnemy]]
Line 13: Line 13:
|p2= sideB: [[Side]]
|p2= sideB: [[Side]]


|r1=[[Boolean]] - True if side B is enemy to side A.
|r1= [[Boolean]] - true if side B is enemy to side A.


|x1= <code>_isEnemy = [<nowiki/>[[west]], [[east]]] [[call]] [[BIS_fnc_sideIsEnemy]]; //Checks if EAST is enemy to WEST.</code>
|x1= <sqf>private _isEnemy = [west, east] call BIS_fnc_sideIsEnemy; //Checks if EAST is enemy to WEST.</sqf>


|seealso= [[getFriend]], [[setFriend]], [[BIS_fnc_sideIsFriendly]], [[Side relations]]
|seealso= [[getFriend]] [[setFriend]] [[BIS_fnc_sideIsFriendly]] [[Side Relations]]
}}
}}

Latest revision as of 15:50, 8 November 2023

Hover & click on the images for description

Description

Description:
Determines if side B is enemy to side A the way the game engine does it. The relationship table can be found here: Side Relations.
Execution:
call
Groups:
Sides

Syntax

Syntax:
[sideA, sideB] call BIS_fnc_sideIsEnemy
Parameters:
sideA: Side
sideB: Side
Return Value:
Boolean - true if side B is enemy to side A.

Examples

Example 1:
private _isEnemy = [west, east] call BIS_fnc_sideIsEnemy; //Checks if EAST is enemy to WEST.

Additional Information

See also:
getFriend setFriend BIS_fnc_sideIsFriendly Side Relations

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