BIS fnc compatibleMagazines: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Function|= Comments " to "{{Function|Comments= ")
m (Text replacement - " (\|[pr][0-9]+ *= *[^-]+) *- *A([a-z])" to " $1 - a$2")
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function


| arma3 |Game name=
|game1= arma3
|version1= 1.96


|1.95|Game version=
|gr1= Weapons


<!---|arg= local |Multiplayer Arguments=--->
|descr= {{Feature|obsolete|
Use [[compatibleMagazines]] instead.|arma3|2.10}}
Gets all compatible magazines for selected weapons. Function looks both for magazines listed in {{hl|magazines}} array and compatible {{hl|magazineWells}}.


<!---|eff= local |Multiplayer Effects=--->
|s1= [weapon, returnHidden] call [[BIS_fnc_compatibleMagazines]]


| <pre>/*
|p1= weapon: [[String]] - weapon's classname
bis_fnc_compatibleMagazines


Get all compatibile magazines for selected weapons. Function looks both for magazines listed in "magazines" array & compatibile magazineWells
|p2= returnHidden: [[Boolean]] - (Optional, default [[false]]) [[true]] to also return magazines with scope 1


Input:
|r1= [[Array]] - array of magazine classes
0: (String) :
Weapon class name
1: (Bool) [Optional] :
Decide if magazines with scope 1 should be also returned


Output:
|x1= <sqf>["arifle_mx_f"] call BIS_fnc_compatibleMagazines;</sqf>
Array of magazines (strings)


Example:
|seealso= [[currentMagazine]] [[currentWeapon]] [[compatibleMagazines]]
["arifle_mx_f"] call bis_fnc_compatibleMagazines;
}}
compatibleMagazines
Author: reyhard
*/</pre>{{Informative|Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]]}} |Description=
 
|[] call [[BIS_fnc_compatibleMagazines]]|Syntax=
 
|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=


|Datatype - description|Return value=
{{Note
 
|user= PierreMGI
|x1= <code></code>|Example 1=
|timestamp= 20200901185900
 
|text= This function returns all magazines in lower case.<br>
|exec= call |Execution=
Example:
 
<sqf>
| |See also=
currentMagazine player; // "30Rnd_762x39_AK12_Mag_F"
currentWeapon player call BIS_fnc_compatibleMagazines; // ["30rnd_762x39_ak12_mag_f", ...]
currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // never works
toLowerANSI currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // works
</sqf>
}}
}}
[[Category:Function Group: Inventory|{{uc:compatibleMagazines}}]]
[[Category:Functions|{{uc:compatibleMagazines}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:compatibleMagazines}}]]

Latest revision as of 12:39, 8 November 2023

Hover & click on the images for description

Description

Description:
🕖
This information is obsolete as of Arma 3 v2.10. Reason: Use compatibleMagazines instead.
Gets all compatible magazines for selected weapons. Function looks both for magazines listed in magazines array and compatible magazineWells.
Execution:
call
Groups:
Weapons

Syntax

Syntax:
[weapon, returnHidden] call BIS_fnc_compatibleMagazines
Parameters:
weapon: String - weapon's classname
returnHidden: Boolean - (Optional, default false) true to also return magazines with scope 1
Return Value:
Array - array of magazine classes

Examples

Example 1:
["arifle_mx_f"] call BIS_fnc_compatibleMagazines;

Additional Information

See also:
currentMagazine currentWeapon compatibleMagazines

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
PierreMGI - c
Posted on Sep 01, 2020 - 18:59 (UTC)
This function returns all magazines in lower case.
Example:
currentMagazine player; // "30Rnd_762x39_AK12_Mag_F" currentWeapon player call BIS_fnc_compatibleMagazines; // ["30rnd_762x39_ak12_mag_f", ...] currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // never works toLowerANSI currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // works