magazinesAmmoFull: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) m (mag type clarification) |
No edit summary |
||
Line 93: | Line 93: | ||
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 --> | |||
<!-- CONTINUE Notes --> | |||
<dl class="command_description"> | |||
<dd class="notedate">Posted on July 10, 2018 - 11:59 (UTC)</dd> | |||
<dt class="note">[[User:HazJ|HazJ]]</dt> | |||
<dd class="note"> Magazine type will return -1 if not currently not loaded - https://forums.bohemia.net/forums/topic/217779-magazine-type-returning-1/ | |||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 12:59, 10 July 2018
Description
- Description:
- 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.
Output format:
[[magazine1],[magazine2],[magazine3]...[magazineN]]
Magazine format:
0: Magazine class name
1: Magazine current ammo count
2: Magazine state (true - loaded, false - not loaded)
3: Magazine type (-1 - n/a, 0 - grenade, 1 - primary weapon mag, 2 - handgun mag, 4 - secondary weapon mag, 65536 - vehicle mag)
4: Magazine location ("Vest", "Uniform", "Backpack", "") or corresponding currentMuzzle - Groups:
- Uncategorised
Syntax
- Syntax:
- magazinesAmmoFull vehicle
- Parameters:
- vehicle: Object - unit or vehicle.
- Return Value:
- Array
Examples
- Example 1:
_magazinesAmmoFull = magazinesAmmoFull player; /* [ ["30Rnd_65x39_caseless_mag",30,false,-1,"Uniform"], ["30Rnd_65x39_caseless_mag",30,false,-1,"Vest"], ["16Rnd_9x21_Mag",16,false,-1,"Vest"], ["SmokeShellGreen",1,true,0,"SmokeShellGreenMuzzle"], ["Chemlight_green",1,true,0,"ChemlightGreenMuzzle"], ["HandGrenade",1,true,0,"HandGrenadeMuzzle"], ["30Rnd_65x39_caseless_mag",30,true,1,"arifle_MX_ACO_pointer_F"], ["16Rnd_9x21_Mag",16,true,2,"hgun_P07_F"] ] */
- Example 2:
_magazinesAmmoFull = magazinesAmmoFull Mi_48; /* [ ["250Rnd_30mm_APDS_shells",250,false,-1,""], ["250Rnd_30mm_HE_shells",250,true,65536,"gatling_30mm"], ["8Rnd_LG_scalpel",8,true,65536,"missiles_SCALPEL"], ["38Rnd_80mm_rockets",38,true,65536,"rockets_Skyfire"] ] */
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
Notes
Bottom Section
- Posted on December 20, 2014 - 14:40 (UTC)
- Actium
-
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. --Actium (talk) 15:40, 20 December 2014 (CET)
- Posted on February 10, 2015 - 04:40 (UTC)
- Pierre MGI
- 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.
- Posted on July 10, 2018 - 11:59 (UTC)
- HazJ
- Magazine type will return -1 if not currently not loaded - https://forums.bohemia.net/forums/topic/217779-magazine-type-returning-1/