BIS fnc limitAmmunition: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[[cC]ategory:[fF]unctions\|\{\{uc:[a-z A-Z_]*\}\}\]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - ">\[ +(.*) *\] +(call|spawn)" to ">[$1] $2") |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
| arma3 | |game1= arma3 | ||
|version1= 1.00 | |||
| | |gr1= Inventory | ||
| | |descr= Limits the number of magazines carried by individual unit. Each container (uniform, vest and backpack) can be limited separately or left untouched. | ||
The function limits the number of magazines of each unique ammo category in respective container. Items like First Aid Kit or Mine Detector are not affected by the function<br><br>Set the minimum and maximum values in an array, for example [0.5,1] will set the magazine count anywhere between 50-100% of default count. | The function limits the number of magazines of each unique ammo category in respective container. Items like First Aid Kit or Mine Detector are not affected by the function<br><br>Set the minimum and maximum values in an array, for example [0.5,1] will set the magazine count anywhere between 50-100% of default count. | ||
| [unit,uniformMags,vestMags,BackpackMags] call [[BIS_fnc_limitAmmunition]] | |s1= [unit,uniformMags,vestMags,BackpackMags] call [[BIS_fnc_limitAmmunition]] | ||
|p1=unit: [[Object]] | |p1=unit: [[Object]] | ||
|p2=uniformMags: [[Array]] - (Optional, default [0.4,0.8]) | |p2=uniformMags: [[Array]] - (Optional, default [0.4,0.8]) amount of magazines in uniform. Array in form: | ||
*0:minMags - Minimum amount of magazines in percent (%) | *0:minMags - Minimum amount of magazines in percent (%) | ||
*1:maxMags - Maximum amount of magazines in percent (%) | *1:maxMags - Maximum amount of magazines in percent (%) | ||
|p3=vestMags: [[Array]] - (Optional, default [0.4,0.8]) | |p3=vestMags: [[Array]] - (Optional, default [0.4,0.8]) amount of magazines in vest. Array in form: | ||
*0:minMags - Minimum amount of magazines in percent (%) | *0:minMags - Minimum amount of magazines in percent (%) | ||
*1:maxMags - Maximum amount of magazines in percent (%) | *1:maxMags - Maximum amount of magazines in percent (%) | ||
|p4=backpackMags: [[Array]] - (Optional, default [0.4,0.8]) | |p4=backpackMags: [[Array]] - (Optional, default [0.4,0.8]) amount of magazines in backpack. Array in form: | ||
*0:minMags - Minimum amount of magazines in percent (%) | *0:minMags - Minimum amount of magazines in percent (%) | ||
*1:maxMags - Maximum amount of magazines in percent (%) | *1:maxMags - Maximum amount of magazines in percent (%) | ||
| [[Boolean]] | |r1= [[Boolean]] | ||
|x1= < | |x1= <sqf>player call BIS_fnc_limitAmmunition;</sqf> | ||
|x2= < | |x2= <sqf>[player,[],[0.5,0.5],[0,1]] call BIS_fnc_limitAmmunition;</sqf> | ||
| [[BIS_fnc_limitWeaponItems]] | |seealso= [[BIS_fnc_limitWeaponItems]] [[BIS_fnc_limitItems]] | ||
}} | }} | ||
Latest revision as of 17:27, 8 November 2023
Description
- Description:
- Limits the number of magazines carried by individual unit. Each container (uniform, vest and backpack) can be limited separately or left untouched.
The function limits the number of magazines of each unique ammo category in respective container. Items like First Aid Kit or Mine Detector are not affected by the function
Set the minimum and maximum values in an array, for example [0.5,1] will set the magazine count anywhere between 50-100% of default count. - Execution:
- call
- Groups:
- Inventory
Syntax
- Syntax:
- [unit,uniformMags,vestMags,BackpackMags] call BIS_fnc_limitAmmunition
- Parameters:
- unit: Object
- uniformMags: Array - (Optional, default [0.4,0.8]) amount of magazines in uniform. Array in form:
- 0:minMags - Minimum amount of magazines in percent (%)
- 1:maxMags - Maximum amount of magazines in percent (%)
- vestMags: Array - (Optional, default [0.4,0.8]) amount of magazines in vest. Array in form:
- 0:minMags - Minimum amount of magazines in percent (%)
- 1:maxMags - Maximum amount of magazines in percent (%)
- backpackMags: Array - (Optional, default [0.4,0.8]) amount of magazines in backpack. Array in form:
- 0:minMags - Minimum amount of magazines in percent (%)
- 1:maxMags - Maximum amount of magazines in percent (%)
- Return Value:
- Boolean
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- BIS_fnc_limitWeaponItems BIS_fnc_limitItems
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