BIS_fnc_limitWeaponItems

From Bohemia Interactive Community
Revision as of 19:42, 3 April 2006 by BIS fnc exportFunctionsToWiki (talk) (Generated by BIS_fnc_exportFunctionsToWiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Hover & click on the images for description

Description

Description:
/*
	Author: Vaclav "Watty Watts" Oliva

	Description:
	Keeps or remove unit's weapon attachments based on probability user sets. Apply for primary, secondary or handgun weapon separately.
	- use 0-100 to randomize the chance of keeping the current attachment
	- use 100 to always keep the attachment
	- use 0 to always remove the attachment

	Parameters:
	Select 0 - OBJECT: Target unit
	Select 1 - NUMBER: Mode - 0 for primary weapon, 1 for secondary, 2 for handgun. Defult is 0.
	Select 2 - NUMBER or ARRAY: Chance to keep the current optics, in %. Default is 50.
	Select 3 - NUMBER or ARRAY: Chance to keep the current side attachment, in %. Default is 50.
	Select 4 - NUMBER or ARRAY: Chance to keep the current muzzle attachment, in %. Default is 50.
	Select 5 - NUMBER or ARRAY: Chance to keep the current underbarrel attachment, in %. Default is 50.

	If you use ["itemClassname",number], the function will add that attachment if it passes the check. If not, current will be removed.

	Returns:
	Boolean

	Examples:
	_limit = [player] call BIS_fnc_limitWeaponItems;
	_limit = [player,0,25,50,75,100] call BIS_fnc_limitWeaponItems;
	_limit = [player,0,25,["acc_flashlight",50],75,100] call BIS_fnc_limitWeaponItems;
	_limit = [player,2,["optic_Yorris",50]] call BIS_fnc_limitWeaponItems;
	_limit = [player,0,["optic_lrps",100],["acc_pointer_ir",100],["muzzle_snds_B",100],["bipod_01_F_blk",100]] call BIS_fnc_limitWeaponItems;
*/

// Params
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

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