BIS fnc tridentExecute: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= ([^ ]+)(\]\]|\}\}), *(\[\[|\{\{)" to "|seealso= $1$2 $3")
m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2")
 
(8 intermediate revisions by the same user not shown)
Line 8: Line 8:
|descr= Execute a code based on Trident relationship.
|descr= Execute a code based on Trident relationship.


|s1=[side_1, side_2, codeFriendly, codeEnemy] call [[BIS_fnc_tridentExecute]]
|s1= [side_1, side_2, codeFriendly, codeEnemy] call [[BIS_fnc_tridentExecute]]


|p1= side_1: [[Side]]
|p1= side_1: [[Side]]
Line 14: Line 14:
|p2= side_2: [[Side]]
|p2= side_2: [[Side]]


|p3= codeFriendly: [[Code]] - Code executed when sides are friendly. Arguments passed to the code are:
|p3= codeFriendly: [[Code]] - code executed when sides are friendly. Arguments passed to the code are:
* 0: [[Side]] - Side with higher score (when the score is even, side from param 0 is used)
* 0: [[Side]] - Side with higher score (when the score is even, side from param 0 is used)
* 1: [[Side]] - Side with lower score (when the score is even, side from param 1 is used)
* 1: [[Side]] - Side with lower score (when the score is even, side from param 1 is used)
* 2: [[Boolean]] - [[true]] when the sides are allied
* 2: [[Boolean]] - [[true]] when the sides are allied


|p4= codeEnemy: [[Code]] - Code executed when sides are enemy
|p4= codeEnemy: [[Code]] - code executed when sides are enemy


|r1= [[Boolean]] - [[true]] when the sides are allied
|r1= [[Boolean]] - [[true]] when the sides are allied


|x1= <code>[<nowiki/>[[west]], [[east]], { [[params]] ["_higherScore", "_lowerScore", "_areAllied"] }] [[call]] [[BIS_fnc_tridentExecute]];</code>
|x1= <sqf>[west, east, { params ["_higherScore", "_lowerScore", "_areAllied"] }] call BIS_fnc_tridentExecute;</sqf>


|seealso= [[BIS_fnc_tridentGetRelationship]] [[BIS_fnc_tridentHandleDamage]], [[BIS_fnc_tridentSetRelationship]]
|seealso= [[BIS_fnc_tridentGetRelationship]] [[BIS_fnc_tridentHandleDamage]] [[BIS_fnc_tridentSetRelationship]]
}}
}}

Latest revision as of 14:00, 8 November 2023

Hover & click on the images for description

Description

Description:
Execute a code based on Trident relationship.
Execution:
call
Groups:
Sides

Syntax

Syntax:
[side_1, side_2, codeFriendly, codeEnemy] call BIS_fnc_tridentExecute
Parameters:
side_1: Side
side_2: Side
codeFriendly: Code - code executed when sides are friendly. Arguments passed to the code are:
  • 0: Side - Side with higher score (when the score is even, side from param 0 is used)
  • 1: Side - Side with lower score (when the score is even, side from param 1 is used)
  • 2: Boolean - true when the sides are allied
codeEnemy: Code - code executed when sides are enemy
Return Value:
Boolean - true when the sides are allied

Examples

Example 1:
[west, east, { params ["_higherScore", "_lowerScore", "_areAllied"] }] call BIS_fnc_tridentExecute;

Additional Information

See also:
BIS_fnc_tridentGetRelationship BIS_fnc_tridentHandleDamage BIS_fnc_tridentSetRelationship

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