throwables: Difference between revisions
BrettMayson (talk | contribs) mNo edit summary |
BrettMayson (talk | contribs) mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 14: | Line 14: | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
|r1= [[Array]] | |r1= [[Array]] of [[Array]]s with [magazineName, muzzleName, id, ammoCount] | ||
* magazineName: [[String]] | * magazineName: [[String]] | ||
* muzzleName: [[String]] | * muzzleName: [[String]] | ||
* id: [[Array]] | * id: [[Array]] with [itemWorldID, creatorID] | ||
** itemWorldID: [[Number]] - unique ID of the item in the world | |||
** creatorID: [[Number]] - unique ID of the player who created the item | |||
* ammoCount: [[Number]] magazine ammo (Since Arma 3 2.22) | * ammoCount: [[Number]] magazine ammo (Since Arma 3 2.22) | ||
| Line 26: | Line 28: | ||
|p22= includeEmpty: [[Boolean]] - (Optional, default: [[false]]) when [[true]] returns empty throwables as well. | |p22= includeEmpty: [[Boolean]] - (Optional, default: [[false]]) when [[true]] returns empty throwables as well. | ||
|r2= [[Array]] | |r2= [[Array]] of [[Array]]s with [magazineName, muzzleName, id, ammoCount] | ||
* magazineName: [[String]] | * magazineName: [[String]] | ||
* muzzleName: [[String]] | * muzzleName: [[String]] | ||
* id: [[Array]] | * id: [[Array]] with [itemWorldID, creatorID] | ||
* ammoCount: [[Number]] magazine ammo | ** itemWorldID: [[Number]] - unique ID of the item in the world | ||
** creatorID: [[Number]] - unique ID of the player who created the item | |||
* ammoCount: [[Number]] magazine ammo (Since Arma 3 2.22) | |||
|x1= <sqf> | |x1= <sqf> | ||
Latest revision as of 10:02, 2 January 2026
Description
- Description:
- Returns all throwables in unit inventory in currentThrowable format.
- Groups:
- WeaponsUnit Inventory
Syntax
- Syntax:
- throwables unit
- Parameters:
- unit: Object
- Return Value:
- Array of Arrays with [magazineName, muzzleName, id, ammoCount]
Alternative Syntax
- Syntax:
- throwables [unit, includeEmpty]
- Parameters:
- unit: Object
- includeEmpty: Boolean - (Optional, default: false) when true returns empty throwables as well.
- Return Value:
- Array of Arrays with [magazineName, muzzleName, id, ammoCount]
Examples
- Example 1:
- throwables player; /* [ ["HandGrenade","HandGrenadeMuzzle",[1e+007,0],1], ["SmokeShell","SmokeShellMuzzle",[1e+007,0],1], ["SmokeShellGreen","SmokeShellGreenMuzzle",[1e+007,0],1], ["Chemlight_green","ChemlightGreenMuzzle",[1e+007,0],1], ["Chemlight_green","",[1e+007,0],1], ["HandGrenade","",[1e+007,0],1] ] */
Additional Information
- See also:
- selectThrowable currentThrowable isThrowable selectWeapon currentWeapon currentMagazine currentMuzzle BIS_fnc_isThrowable
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note