magazinesAmmoFull: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(note about empty magazines)
m (Some wiki formatting)
 
(48 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 0.76


|0.76|= Game version
|gr1= Unit Inventory
____________________________________________________________________________________________


| Returns array of arrays of all vehicle's magazines with extended information about them. Magazine type is available for loaded magazines only, otherwise it is -1.
|gr2= Vehicle Inventory


|descr= Returns array of arrays of all unit's or vehicle's magazines with extended information about them.
The magazines returned are for primary gunner. If you need magazines for all turrets, see [[magazinesAllTurrets]].
{{Feature|important|This command does not return empty magazines from containers, only from the weapon. Use [[magazinesAmmoCargo]] instead.}}


<br><br>'''Output format''':
|s1= [[magazinesAmmoFull]] entity
<br>[[magazine1],[magazine2],[magazine3]...[magazineN]]


<br><br>'''Magazine format''':
|p1= entity: [[Object]] - unit or vehicle
<br>0: Magazine class name
<br>1: Magazine current ammo count
<br>2: Magazine state (true - loaded, false - not loaded)
<br>3: Magazine type (-1 - n/a, 0 - grenade, 1 - primary weapon mag, 2 - handgun mag, 4 - secondary weapon mag, 65536 - vehicle mag)
<br>4: Magazine location ("Vest", "Uniform", "Backpack", "") or corresponding [[currentMuzzle]] <br><br>
{{Important | This command does not return empty magazines from containers, only from the weapon. Use <tt>[[magazinesAmmoCargo]] &lt;container&gt;</tt> instead}} |= Description
____________________________________________________________________________________________


| [[magazinesAmmoFull]] vehicle |= Syntax
|r1= [[Array]] of [[Array]]s in format:
* [[String]]: magazine class name
* [[Number]]: magazine ammo count
* [[Boolean]]: is magazine loaded
* [[Number]]: magazine type:
** -1 = n/a (default if magazine is not loaded)
** 0 - grenade
** 1 - primary weapon mag
** 2 - handgun mag
** 4 - secondary weapon mag
** 4096 - binocular weapon mag
** 65536 - vehicle mag
* [[String]]: magazine location: "Vest", "Uniform", "Backpack", "" or [[currentMuzzle]] if the magazine is loaded
* {{GVI|arma3|2.08|size= 0.75}} [[Number]]: magazine id, starts with 10000000; use <sqf inline>toFixed 0;</sqf> to see this number in a human readable format
* {{GVI|arma3|2.08|size= 0.75}} [[Number]]: magazine creator


|p1= vehicle: [[Object]] - unit or vehicle.  |= PARAMETER1
|s2= [[magazinesAmmoFull]] [vehicle, includeEmpty]


| [[Array]] |= RETURNVALUE
|s2since= arma3 2.00
 
|p21= vehicle: [[Object]] - unit or vehicle
 
|p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines
 
|r2= same as [[#Syntax|Primary Syntax]]
   
   
|x1=<code>_magazinesAmmoFull = [[magazinesAmmoFull]] [[player]];
|x1= <sqf>
toFixed 0;
magazinesAmmoFull player;
/*
/*
[
[
["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform"],
["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform",10000003,0],
["30Rnd_65x39_caseless_mag",30,false,-1,"Vest"],
["Chemlight_green",1,true,0,"ChemlightGreenMuzzle",10000016,0],
["16Rnd_9x21_Mag",16,false,-1,"Vest"],
["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000008,0],
["SmokeShellGreen",1,true,0,"SmokeShellGreenMuzzle"],
["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000009,0],
["Chemlight_green",1,true,0,"ChemlightGreenMuzzle"],
["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000010,0],
["HandGrenade",1,true,0,"HandGrenadeMuzzle"],
["HandGrenade",1,true,0,"HandGrenadeMuzzle",10000018,0],
["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F"],
["HandGrenade",1,false,-1,"Vest",10000019,0],
["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F"]
["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F",10000001,0],
["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F",10000011,0]
]
]
<nowiki>*/</nowiki></code>|= EXAMPLE1
*/</sqf>


|x2=<code>_magazinesAmmoFull = [[magazinesAmmoFull]] Mi_48;
|x2= <sqf>
toFixed 0;
magazinesAmmoFull Mi_48;
/*
/*
[
[
["250Rnd_30mm_APDS_shells",250,false,-1,""],
["250Rnd_30mm_HE_shells_Tracer_Green",250,true,65536,"HE",10000043,0],
["250Rnd_30mm_HE_shells",250,true,65536,"gatling_30mm"],
["250Rnd_30mm_APDS_shells_Tracer_Green",250,true,65536,"AP",10000044,0],
["8Rnd_LG_scalpel",8,true,65536,"missiles_SCALPEL"],
["Laserbatteries",1,true,65536,"Laserdesignator_mounted",10000045,0],
["38Rnd_80mm_rockets",38,true,65536,"rockets_Skyfire"]
["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000049,0],
["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000051,0],
["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000052,0],
["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000053,0]
]
]
<nowiki>*/</nowiki></code>|= EXAMPLE2
*/</sqf>
____________________________________________________________________________________________


| [[magazinesAmmo]], [[magazinesAmmoCargo]], [[magazinesDetail]], [[magazines]], [[magazinesTurret]] |= SEEALSO
|seealso= [[magazinesAmmo]] [[magazinesAmmoCargo]] [[magazinesDetail]] [[magazines]] [[magazinesTurret]]
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}


<h3 style='display:none'>Notes</h3>
{{Note
<dl class='command_description'>
|user= Actium
<!-- Note Section BEGIN -->
|timestamp= 20141220144000
 
|text= When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).<br>
<!-- Note Section END -->
</dl>
 
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 20, 2014 - 14:40 (UTC)</dd>
<dt class="note">[[User:Actium|Actium]]</dt>
<dd class="note">
When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]). <br>
If you want to get all turrets' magazines, use [[allTurrets]] and [[magazinesTurret]].
If you want to get all turrets' magazines, use [[allTurrets]] and [[magazinesTurret]].
--[[User:Actium|Actium]] ([[User talk:Actium|talk]]) 15:40, 20 December 2014 (CET)
}}
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
{{Note
<dl class="command_description">
|user= Pierre MGI
<dd class="notedate">Posted on February 10, 2015 - 04:40 (UTC)</dd>
|timestamp= 20150210044000
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
|text= As Actium said, this function seems to extract data from:
<dd class="note">
<sqf>configFile >> "CfgVehicles" >> _the_vehicle_you_want >> "Turrets" >> "MainTurret">> "magazines"</sqf>
As Actium said, this function seems to extract data from:
configfile >> "CfgVehicles" >> _the_vehicle_you_want >> "Turrets" >> "MainTurret">> "magazines".
Some vehicles return an empty field {} because magazines are in straight in:
Some vehicles return an empty field {} because magazines are in straight in:
configfile >> "CfgVehicles" >> _the_vehicle_you_want >> "magazines" (often dedicated to flares only).
<sqf>configFile >> "CfgVehicles" >> _the_vehicle_you_want >> "magazines" // often dedicated to flares only</sqf>


This is the case of WY-55 Hellcat. This function returns an empty array.
This is the case of WY-55 Hellcat. This function returns an empty array.
</dd>
}}
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 16:53, 27 July 2023

Hover & click on the images for description

Description

Description:
Returns array of arrays of all unit's or vehicle's magazines with extended information about them. The magazines returned are for primary gunner. If you need magazines for all turrets, see magazinesAllTurrets.
This command does not return empty magazines from containers, only from the weapon. Use magazinesAmmoCargo instead.
Groups:
Unit InventoryVehicle Inventory

Syntax

Syntax:
magazinesAmmoFull entity
Parameters:
entity: Object - unit or vehicle
Return Value:
Array of Arrays in format:
  • String: magazine class name
  • Number: magazine ammo count
  • Boolean: is magazine loaded
  • Number: magazine type:
    • -1 = n/a (default if magazine is not loaded)
    • 0 - grenade
    • 1 - primary weapon mag
    • 2 - handgun mag
    • 4 - secondary weapon mag
    • 4096 - binocular weapon mag
    • 65536 - vehicle mag
  • String: magazine location: "Vest", "Uniform", "Backpack", "" or currentMuzzle if the magazine is loaded
  • Arma 3 logo black.png2.08 Number: magazine id, starts with 10000000; use toFixed 0; to see this number in a human readable format
  • Arma 3 logo black.png2.08 Number: magazine creator

Alternative Syntax

Syntax:
magazinesAmmoFull [vehicle, includeEmpty]
Parameters:
vehicle: Object - unit or vehicle
includeEmpty: Boolean - (Optional, default false) true to include empty magazines
Return Value:
same as Primary Syntax

Examples

Example 1:
toFixed 0; magazinesAmmoFull player; /* [ ["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform",10000003,0], ["Chemlight_green",1,true,0,"ChemlightGreenMuzzle",10000016,0], ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000008,0], ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000009,0], ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest",10000010,0], ["HandGrenade",1,true,0,"HandGrenadeMuzzle",10000018,0], ["HandGrenade",1,false,-1,"Vest",10000019,0], ["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F",10000001,0], ["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F",10000011,0] ] */
Example 2:
toFixed 0; magazinesAmmoFull Mi_48; /* [ ["250Rnd_30mm_HE_shells_Tracer_Green",250,true,65536,"HE",10000043,0], ["250Rnd_30mm_APDS_shells_Tracer_Green",250,true,65536,"AP",10000044,0], ["Laserbatteries",1,true,65536,"Laserdesignator_mounted",10000045,0], ["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000049,0], ["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000051,0], ["PylonRack_19Rnd_Rocket_Skyfire",19,false,-1,"",10000052,0], ["PylonRack_4Rnd_LG_scalpel",4,false,-1,"",10000053,0] ] */

Additional Information

See also:
magazinesAmmo magazinesAmmoCargo magazinesDetail magazines magazinesTurret

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
Actium - c
Posted on Dec 20, 2014 - 14:40 (UTC)
When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).
If you want to get all turrets' magazines, use allTurrets and magazinesTurret.
Pierre MGI - c
Posted on Feb 10, 2015 - 04:40 (UTC)
As Actium said, this function seems to extract data from:
configFile >> "CfgVehicles" >> _the_vehicle_you_want >> "Turrets" >> "MainTurret">> "magazines"
Some vehicles return an empty field {} because magazines are in straight in:
configFile >> "CfgVehicles" >> _the_vehicle_you_want >> "magazines" // often dedicated to flares only
This is the case of WY-55 Hellcat. This function returns an empty array.