BIS fnc limitAmmunition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1 = Inventory | |gr1 = Inventory | ||
| Limits the number of magazines carried by individual unit. Each container (uniform, vest and backpack) can be limited separately or left untouched. | | 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]] | | [unit,uniformMags,vestMags,BackpackMags] call [[BIS_fnc_limitAmmunition]] | ||
|p1=unit: [[Object]] | |p1=unit: [[Object]] | ||
|p2=uniformMags: [[Array]] - (Optional, default [0.4,0.8]) Amount of magazines in uniform. Array in form: | |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]) Amount of magazines in vest. Array in form: | |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]) Amount of magazines in backpack. Array in form: | |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]] | | [[Boolean]] | ||
|x1= <code>[[player]] [[call]] [[BIS_fnc_limitAmmunition]];</code> | |x1= <code>[[player]] [[call]] [[BIS_fnc_limitAmmunition]];</code> | ||
|x2= <code>[ [[player]],[],[0.5,0.5],[0,1] ] [[call]] [[BIS_fnc_limitAmmunition]];</code> | |x2= <code>[ [[player]],[],[0.5,0.5],[0,1] ] [[call]] [[BIS_fnc_limitAmmunition]];</code> | ||
| [[BIS_fnc_limitWeaponItems]], [[BIS_fnc_limitItems]] | | [[BIS_fnc_limitWeaponItems]], [[BIS_fnc_limitItems]] | ||
}} | }} | ||
Revision as of 23:11, 17 January 2021
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:
player call BIS_fnc_limitAmmunition;
- Example 2:
[ player,[],[0.5,0.5],[0,1] ] call BIS_fnc_limitAmmunition;
Additional Information
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