BIS fnc limitItems: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision imported: BIS Functions update 2/7)
m (pf)
Line 1: Line 1:
{{Function|Comments=
____________________________________________________________________________________________


{{Function|= Comments
| arma3 |Game name=
 
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 |= Game name
| Keeps or removes unit's items (including NVGs and binocular/designator) based on probability user sets. |Description=
____________________________________________________________________________________________


|1.00|= Game version
| [unit,chanceNVG,chanceBino,chanceGPS,chanceMap,chanceRadio,chanceCompass,chanceWatch] call [[BIS_fnc_limitItems]] |Syntax=
____________________________________________________________________________________________
 
|p1=unit: [[Object]] |Parameter 1=
 
|p2=chanceNVG: [[Number]] - (Optional, default 50) - Chance to keep NVG in %
*0 = Item is always removed
*100 = Item is always kept |Parameter 1=
 
|p2=chanceBino: [[Number]] - (Optional, default 50) - Chance to keep binoculars in % |Parameter 2=


| <pre>/*
|p3=chanceGPS: [[Number]] - (Optional, default 50) - Chance to keep GPS in % |Parameter 3=
Author: Vaclav "Watty Watts" Oliva


Description:
|p4=chanceMap: [[Number]] - (Optional, default 50) - Chance to keep Map in % |Parameter 4=
Keeps or removes unit's items (including NVGs and binocular/designator) based on probability user sets.
- 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:
|p5=chanceRadio: [[Number]] - (Optional, default 50) - Chance to keep radio in % |Parameter 5=
Select 0 - OBJECT: Target unit
Select 1 - NUMBER: Chance to keep the NVGs. Default is 50.
Select 2 - NUMBER: Chance to keep the binocular. Default is 50.
Select 3 - NUMBER: Chance to keep the GPS. Default is 50.
Select 4 - NUMBER: Chance to keep the map. Default is 50.
Select 5 - NUMBER: Chance to keep the radio. Default is 50.
Select 6 - NUMBER: Chance to keep the compass. Default is 50.
Select 7 - NUMBER: Chance to keep the watch. Default is 50.


Returns:
|p6=chanceCompass: [[Number]] - (Optional, default 50) - Chance to keep compass in % |Parameter 6=
Boolean


Examples:
|p7=chanceWatch: [[Number]] - (Optional, default 50) - Chance to keep watch in % |Parameter 7=
_limit = [player] call BIS_fnc_limitItems;
_limit = [player,0,15,30,45,60,75,90] call BIS_fnc_limitItems;
*/


// Params
| [[Boolean]] |Return value=
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_limitItems]]; --> |= Syntax
|x1= <code>[[player]] [[call]] [[BIS_fnc_limitItems]];</code>|Example 1=
|p1= |= Parameter 1


| |= Return value
|x2= <code>[ [[player]],0,15,30,45,60,75,90 ] [[call]] [[BIS_fnc_limitItems]];</code>|Example 2=
____________________________________________________________________________________________


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


| |= See also
| [[BIS_fnc_limitWeaponItems]], [[BIS_fnc_limitAmmunition]]  |See also=
 
}}
}}



Revision as of 12:46, 20 June 2018

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:
Uncategorised

Syntax

Syntax:
[unit,chanceNVG,chanceBino,chanceGPS,chanceMap,chanceRadio,chanceCompass,chanceWatch] call BIS_fnc_limitItems
Parameters:
unit: Object
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

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_limitWeaponItemsBIS_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

Notes

Bottom Section