BIS fnc tridentExecute: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2")
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Sides


|1.00|= Game version
|descr= Execute a code based on Trident relationship.
____________________________________________________________________________________________


| <pre>/*
|s1= [side_1, side_2, codeFriendly, codeEnemy] call [[BIS_fnc_tridentExecute]]


Description:
|p1= side_1: [[Side]]
Execute a code based on Trident relationship.
Parameter(s):
0: SIDE
1: SIDE
2: CODE - code executed when the sides are friendly
3: CODE - code executed when the sides are enemies


Arguments passed to the code are:
|p2= side_2: [[Side]]
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: BOOL - true when the sides are allied


Returns:
|p3= codeFriendly: [[Code]] - code executed when sides are friendly. Arguments passed to the code are:
BOOL - true when the sides are allied
* 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


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p4= codeEnemy: [[Code]] - code executed when sides are enemy
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_tridentExecute]]; --> |= Syntax
|r1= [[Boolean]] - [[true]] when the sides are allied


|p1= |= Parameter 1
|x1= <sqf>[west, east, { params ["_higherScore", "_lowerScore", "_areAllied"] }] call BIS_fnc_tridentExecute;</sqf>
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_tridentGetRelationship]] [[BIS_fnc_tridentHandleDamage]] [[BIS_fnc_tridentSetRelationship]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:tridentExecute}}]]
[[Category:Functions|{{uc:tridentExecute}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:tridentExecute}}]]

Latest revision as of 15: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