BIS fnc moduleFriendlyFire: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "\[ +" to "[")
 
(34 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


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


| arma3 |= Game name
|gr1= Modules


|1.00|= Game version
|descr= <pre>/*******************************************************************************
____________________________________________________________________________________________
Version: 2.0
 
Name: Friendly Fire
| <pre>//scriptName "Functions\systems\fn_modulefriendlyfire.sqf";
Author: Zozo
/*******************************************************************************
DESCRIPTION: Handles the friendly fire. Use either the module interface in the editor, or call individual functions.
Version: 0.1
Name: Friendly Fire
DESCRIPTION: www.
PARAMETERS: 1) function called - string, list of functions:
PARAMETERS: 1) function called - string, list of functions:
- Init
- Init
- Destroy
- Destroy
2) parameter for the function
- AddUnits
For more informations see https://
- RemoveUnits
- ChangePriority
- ListActiveUnit
2) parameter for the function
RETURNED VALUE: depends on the function called
RETURNED VALUE: depends on the function called
EXAMPLES:
TODO:         + AddUnitToFriendlyFire
// Initializes the module if not added in editor
+ RemoveUnitFromFriendlyFire - will need to change data structure - must remember eventhandlers :-(
// No units are directly checked for friendly fire, but renegade state is checked anyway
+ CheckRenegadeStatus
_ret = ["Init", []] call BIS_fnc_moduleFriendlyFire
- StopChecking the status (pause?)
 
- RemoveEventhandlers on Destroy - will need to change data structure - must remember eventhandlers :-(
// Initializes the module if not added in editor
+ change calling of execVM "fn_moduleFriendlyFire.sqf"
// BIS_vip1, BIS_vip2, BIS_noVip units are directly checked for friendly fire
- Display a warning message if player will shoot a civilian
x = ["Init", [[BIS_vip1, BIS_vip2, BIS_noVip],true]] call BIS_fnc_moduleFriendlyFire
- handle deleted units (clear array from NULL-OBJECT)
*******************************************************************************/


//Functions interface
// De-initializes the module
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
_ret = ["Destroy"] call BIS_fnc_moduleFriendlyFire
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_moduleFriendlyFire]]; --> |= Syntax
// Add BIS_vip3 unit to be checked for friendly fire
x = ["AddUnits", [[BIS_vip3]]] call BIS_fnc_moduleFriendlyFire


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


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


|x1= <code></code> |=
*******************************************************************************/</pre>
____________________________________________________________________________________________


| |= See also
{{Wiki|placeholder}}


}}
|s1= <!-- [] call [[BIS_fnc_moduleFriendlyFire]] -->


<h3 style="display:none">Notes</h3>
|r1=
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <!-- <sqf>[] call BIS_fnc_moduleFriendlyFire;</sqf> -->
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso=
[[Category:Function Group: Misc|{{uc:moduleFriendlyFire}}]]
}}
[[Category:Functions|{{uc:moduleFriendlyFire}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:moduleFriendlyFire}}]]

Latest revision as of 19:16, 8 November 2023

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

Examples:
Example needed

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