BIS fnc areFriendly: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)<nowiki\/>\[\[([a-zA-Z0-9_]+)\]\](.*)<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(8 intermediate revisions by the same user not shown)
Line 10: Line 10:
|s1= [side1, side2] call [[BIS_fnc_areFriendly]]
|s1= [side1, side2] call [[BIS_fnc_areFriendly]]


|p1= side1: [[Side]] - First side, will be compared to second side.
|p1= side1: [[Side]] - first side, will be compared to second side.
|p2= side2: [[Side]] - Second side, will be compared to first side.
|p2= side2: [[Side]] - second side, will be compared to first side.


|r1= [[Boolean]] - True if sides are friendly to each other, false if not.
|r1= [[Boolean]] - true if sides are friendly to each other, false if not.


|x1= <code>[[private]] _areFriendly = [west, [[east]]] [[call]] [[BIS_fnc_areFriendly]];</code>
|x1= <sqf>private _areFriendly = [west, east] call BIS_fnc_areFriendly;</sqf>


|seealso= [[getFriend]] [[BIS_fnc_sideIsFriendly]] [[BIS_fnc_sideIsEnemy]]
|seealso= [[getFriend]] [[BIS_fnc_sideIsFriendly]] [[BIS_fnc_sideIsEnemy]]
Line 23: Line 23:


<dt></dt>
<dt></dt>
<dd class="notedate">Posted on September 29, 2014 - 19:31 (UTC)</dd>
<dd class="notedate">Posted on 2014-09-29 - 19:31 (UTC)</dd>
<dt class="note">[[User:Tryteyker-|Tryteyker-]]</dt>
<dt class="note">[[User:Tryteyker-|Tryteyker-]]</dt>
<dd class="note">
<dd class="note">

Latest revision as of 15:50, 8 November 2023

Hover & click on the images for description

Description

Description:
Function that takes two Sides and compares them, returning whether they are friendly or not.
Execution:
call
Groups:
Sides

Syntax

Syntax:
[side1, side2] call BIS_fnc_areFriendly
Parameters:
side1: Side - first side, will be compared to second side.
side2: Side - second side, will be compared to first side.
Return Value:
Boolean - true if sides are friendly to each other, false if not.

Examples

Example 1:
private _areFriendly = [west, east] call BIS_fnc_areFriendly;

Additional Information

See also:
getFriend BIS_fnc_sideIsFriendly BIS_fnc_sideIsEnemy

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 2014-09-29 - 19:31 (UTC)
Tryteyker-
The friendly limit determined in the script is 0.6. Anything under 0.6 is considered hostile, whilst >=0.6 is considered friendly.