throwables: Difference between revisions
Lou Montana (talk | contribs) m (Fix) |
BrettMayson (talk | contribs) mNo edit summary |
||
| (6 intermediate revisions by 2 users 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]] of [[Number]] | * 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) | |||
|s2= [[throwables]] [unit, includeEmpty] | |||
|s2since= arma3 2.22 | |||
|p21= unit: [[Object]] | |||
|p22= includeEmpty: [[Boolean]] - (Optional, default: [[false]]) when [[true]] returns empty throwables as well. | |||
|r2= [[Array]] of [[Array]]s with [magazineName, muzzleName, id, ammoCount] | |||
* magazineName: [[String]] | |||
* muzzleName: [[String]] | |||
* 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) | |||
|x1= <sqf> | |x1= <sqf> | ||
| Line 23: | Line 40: | ||
/* | /* | ||
[ | [ | ||
["HandGrenade","HandGrenadeMuzzle",[1e+007,0]], | ["HandGrenade","HandGrenadeMuzzle",[1e+007,0],1], | ||
["SmokeShell","SmokeShellMuzzle",[1e+007,0]], | ["SmokeShell","SmokeShellMuzzle",[1e+007,0],1], | ||
["SmokeShellGreen","SmokeShellGreenMuzzle",[1e+007,0]], | ["SmokeShellGreen","SmokeShellGreenMuzzle",[1e+007,0],1], | ||
["Chemlight_green","ChemlightGreenMuzzle",[1e+007,0]], | ["Chemlight_green","ChemlightGreenMuzzle",[1e+007,0],1], | ||
["Chemlight_green","",[1e+007,0]], | ["Chemlight_green","",[1e+007,0],1], | ||
["HandGrenade","",[1e+007,0]] | ["HandGrenade","",[1e+007,0],1] | ||
] | ] | ||
*/ | */ | ||
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