BIS fnc moduleFriendlyFire: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Misc(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 7: Line 6:


|gr1= Modules |GROUP1=
|gr1= Modules |GROUP1=
____________________________________________________________________________________________


| <pre>/*******************************************************************************
| <pre>/*******************************************************************************
Line 47: Line 45:


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |DESCRIPTION=
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |DESCRIPTION=
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_moduleFriendlyFire]]; --> |SYNTAX=
| <!-- [] call [[BIS_fnc_moduleFriendlyFire]]; --> |SYNTAX=
Line 54: Line 51:


| |RETURNVALUE=
| |RETURNVALUE=
____________________________________________________________________________________________


|x1= <code></code> |EXAMPLE1=
|x1= <code></code> |EXAMPLE1=
____________________________________________________________________________________________


| |SEEALSO=
| |SEEALSO=

Revision as of 00:20, 17 January 2021

Hover & click on the images for description

Description

Description:
/*******************************************************************************
	Version:			2.0
	Name:				Friendly Fire
	Author:				Zozo
	DESCRIPTION:	Handles the friendly fire. Use either the module interface in the editor, or call individual functions.
	PARAMETERS:		1) function called - string, list of functions:
				- Init
				- Destroy
				- AddUnits
				- RemoveUnits
				- ChangePriority
				- ListActiveUnit
				2) parameter for the function
	RETURNED VALUE:	depends on the function called
        EXAMPLES:
				// Initializes the module if not added in editor
				// No units are directly checked for friendly fire, but renegade state is checked anyway
				_ret = [ "Init", [] ] call BIS_fnc_moduleFriendlyFire

				// Initializes the module if not added in editor
				// BIS_vip1, BIS_vip2, BIS_noVip units are directly checked for friendly fire
				x = [ "Init", [ [ BIS_vip1, BIS_vip2, BIS_noVip],true ] ] call BIS_fnc_moduleFriendlyFire

				// De-initializes the module
				_ret = [ "Destroy" ] call BIS_fnc_moduleFriendlyFire

				// Add BIS_vip3 unit to be checked for friendly fire
				x = [ "AddUnits", [ [BIS_vip3] ] ] call BIS_fnc_moduleFriendlyFire

				// Remove BIS_vip1 unit from active units
				x = [ "RemoveUnits", [ [ BIS_vip1 ] ] ] call BIS_fnc_moduleFriendlyFire

				// set another priority for a vehicle- if it is hit once, considered as friendly fire
				x = [ "ChangePriority",  [BIS_vip,1] ] call BIS_fnc_moduleFriendlyFire

*******************************************************************************/

(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Modules

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:

Additional Information

See also:
See also needed

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

Notes

Bottom Section