throwables: Difference between revisions
m (2.16 -> 2.18) |
Killzone Kid (talk | contribs) No edit summary |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.18 | |version1= 2.18 | ||
|gr1= Weapons | |gr1= Weapons | ||
Line 15: | Line 14: | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
|r1= [[Array]] - array of throwables | |r1= [[Array]] - array of throwables in format [<nowiki>[</nowiki>magazineName, muzzleName, id, ammoCount], ...], where: | ||
* magazineName: [[String]] | |||
* muzzleName: [[String]] | |||
* id: [[Array]] of [[Number]] pairs: [itemWorldID, creatorID] | |||
* ammoCount: [[Number]] magazine ammo (Since Arma 3 2.22) | |||
|x1= <sqf>throwables player; | |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]] - array of throwables in format [<nowiki>[</nowiki>magazineName, muzzleName, id, ammoCount], ...], where: | |||
* magazineName: [[String]] | |||
* muzzleName: [[String]] | |||
* id: [[Array]] of [[Number]] pairs: [itemWorldID, creatorID] | |||
* ammoCount: [[Number]] magazine ammo (Since Arma 3 2.22) | |||
|x1= <sqf> | |||
throwables player; | |||
/* | /* | ||
[ | [ | ||
["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] | ||
] | ] | ||
*/</sqf> | */ | ||
</sqf> | |||
|seealso= [[selectThrowable]] [[currentThrowable]] [[isThrowable]] [[selectWeapon]] [[currentWeapon]] [[currentMagazine]] [[currentMuzzle]] [[BIS_fnc_isThrowable]] | |seealso= [[selectThrowable]] [[currentThrowable]] [[isThrowable]] [[selectWeapon]] [[currentWeapon]] [[currentMagazine]] [[currentMuzzle]] [[BIS_fnc_isThrowable]] | ||
}} | }} |
Latest revision as of 23:18, 1 September 2025
Description
- Description:
- Returns all throwables in unit inventory in currentThrowable format.
- Groups:
- WeaponsUnit Inventory
Syntax
- Syntax:
- throwables unit
- Parameters:
- unit: Object
- Return Value:
- Array - array of throwables in format [[magazineName, muzzleName, id, ammoCount], ...], where:
Alternative Syntax
- Syntax:
- throwables [unit, includeEmpty]
- Parameters:
- unit: Object
- includeEmpty: Boolean (Optional, default: false) - when true returns empty throwables as well.
- Return Value:
- Array - array of throwables in format [[magazineName, muzzleName, id, ammoCount], ...], where:
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 or on the Forums.
Only post proven facts here! Add Note