BIS fnc limitItems: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Inventory(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Some wiki formatting)
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Inventory


|gr1 = Inventory |GROUP1=
|descr= Keeps or removes unit's items (including NVGs and binocular/designator) based on probability user sets.
____________________________________________________________________________________________


| Keeps or removes unit's items (including NVGs and binocular/designator) based on probability user sets. |Description=
|s1= [unit, chanceNVG, chanceBino, chanceGPS, chanceMap, chanceRadio, chanceCompass, chanceWatch] call [[BIS_fnc_limitItems]]
____________________________________________________________________________________________


| [unit,chanceNVG,chanceBino,chanceGPS,chanceMap,chanceRadio,chanceCompass,chanceWatch] call [[BIS_fnc_limitItems]] |Syntax=
|p1= unit: [[Object]]


|p1=unit: [[Object]] |Parameter 1=
|p2= chanceNVG: [[Number]] - (Optional, default 50) chance to keep NVGs in % (range 0..100)
* 0 = NVGs are always removed
* 100 = NVGs are always kept


|p2=chanceNVG: [[Number]] - (Optional, default 50) - Chance to keep NVG in %
|p3= chanceBino: [[Number]] - (Optional, default 50) chance to keep binoculars in %
* 0 = Item is always removed
* 100 = Item is always kept |Parameter2=


|p3=chanceBino: [[Number]] - (Optional, default 50) - Chance to keep binoculars in % |Parameter 3=
|p4= chanceGPS: [[Number]] - (Optional, default 50) chance to keep GPS in %


|p4=chanceGPS: [[Number]] - (Optional, default 50) - Chance to keep GPS in % |Parameter 4=
|p5= chanceMap: [[Number]] - (Optional, default 50) chance to keep Map in %


|p5=chanceMap: [[Number]] - (Optional, default 50) - Chance to keep Map in % |Parameter 5=
|p6= chanceRadio: [[Number]] - (Optional, default 50) chance to keep radio in %


|p6=chanceRadio: [[Number]] - (Optional, default 50) - Chance to keep radio in % |Parameter 6=
|p7= chanceCompass: [[Number]] - (Optional, default 50) chance to keep compass in %


|p7=chanceCompass: [[Number]] - (Optional, default 50) - Chance to keep compass in % |Parameter 7=
|p8= chanceWatch: [[Number]] - (Optional, default 50) chance to keep watch in %


|p8=chanceWatch: [[Number]] - (Optional, default 50) - Chance to keep watch in % |Parameter 8=
|r1= [[Boolean]] - always [[true]]


| [[Boolean]] |Return value=
|x1= <sqf>player call BIS_fnc_limitItems;</sqf>
____________________________________________________________________________________________


|x1= <code>[[player]] [[call]] [[BIS_fnc_limitItems]];</code> |Example 1=
|x2= <sqf>[player, 0, 15, 30, 45, 60, 75, 90] call BIS_fnc_limitItems;</sqf>


|x2= <code>[<nowiki/>[[player]],0,15,30,45,60,75,90] [[call]] [[BIS_fnc_limitItems]];</code> |Example 2=
|seealso= [[BIS_fnc_limitWeaponItems]] [[BIS_fnc_limitAmmunition]]
 
____________________________________________________________________________________________
 
| [[BIS_fnc_limitWeaponItems]], [[BIS_fnc_limitAmmunition]] |See also=
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>

Latest revision as of 11:05, 8 November 2023

Hover & click on the images for description

Description

Description:
Keeps or removes unit's items (including NVGs and binocular/designator) based on probability user sets.
Execution:
call
Groups:
Inventory

Syntax

Syntax:
[unit, chanceNVG, chanceBino, chanceGPS, chanceMap, chanceRadio, chanceCompass, chanceWatch] call BIS_fnc_limitItems
Parameters:
unit: Object
chanceNVG: Number - (Optional, default 50) chance to keep NVGs in % (range 0..100)
  • 0 = NVGs are always removed
  • 100 = NVGs are always kept
chanceBino: Number - (Optional, default 50) chance to keep binoculars in %
chanceGPS: Number - (Optional, default 50) chance to keep GPS in %
chanceMap: Number - (Optional, default 50) chance to keep Map in %
chanceRadio: Number - (Optional, default 50) chance to keep radio in %
chanceCompass: Number - (Optional, default 50) chance to keep compass in %
chanceWatch: Number - (Optional, default 50) chance to keep watch in %
Return Value:
Boolean - always true

Examples

Example 1:
player call BIS_fnc_limitItems;
Example 2:
[player, 0, 15, 30, 45, 60, 75, 90] call BIS_fnc_limitItems;

Additional Information

See also:
BIS_fnc_limitWeaponItems BIS_fnc_limitAmmunition

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