throwables: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{RV|type=command |game1= arma3 |version1= 2.16 |branch= dev |gr1= Weapons |gr2= Unit Inventory |descr= Returns all throwables in unit inventory in currentThrowable fo...")
 
m (Fix)
 
(8 intermediate revisions by 5 users not shown)
Line 2: Line 2:


|game1= arma3
|game1= arma3
|version1= 2.16
|version1= 2.18
|branch= dev


|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], ...], where:
* magazineName: [[String]]
* muzzleName: [[String]]
* id: [[Array]] of [[Number]] pairs: [itemWorldID, creatorID]


|x1= <sqf>throwables player; //[[["HandGrenade","HandGrenadeMuzzle",[1e+007,0]],["SmokeShell","SmokeShellMuzzle",[1e+007,0]],["SmokeShellGreen","SmokeShellGreenMuzzle",[1e+007,0]],["Chemlight_green","ChemlightGreenMuzzle",[1e+007,0]],["Chemlight_green","",[1e+007,0]],["HandGrenade","",[1e+007,0]]]</sqf>
|x1= <sqf>
throwables player;
/*
[
["HandGrenade","HandGrenadeMuzzle",[1e+007,0]],
["SmokeShell","SmokeShellMuzzle",[1e+007,0]],
["SmokeShellGreen","SmokeShellGreenMuzzle",[1e+007,0]],
["Chemlight_green","ChemlightGreenMuzzle",[1e+007,0]],
["Chemlight_green","",[1e+007,0]],
["HandGrenade","",[1e+007,0]]
]
*/
</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 16:07, 8 October 2024

Hover & click on the images for description

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], ...], where:

Examples

Example 1:
throwables player; /* [ ["HandGrenade","HandGrenadeMuzzle",[1e+007,0]], ["SmokeShell","SmokeShellMuzzle",[1e+007,0]], ["SmokeShellGreen","SmokeShellGreenMuzzle",[1e+007,0]], ["Chemlight_green","ChemlightGreenMuzzle",[1e+007,0]], ["Chemlight_green","",[1e+007,0]], ["HandGrenade","",[1e+007,0]] ] */

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