Arma 3 Scripting

currentThrowable

  • Arma 3 v1.48

Command · also in Unit Inventory · Markdown · JSON · original wiki page

Description

Returns currently selected throwable (and the muzzle it is loaded into), which will be launched if the user presses G.

Syntax

currentThrowable unit

Parameters:

Returns: Array with [magazineName, muzzleName, id, ammoCount]

Examples

Example 1

currentThrowable player; // ["SmokeShellGreen", "SmokeShellGreenMuzzle", [1.00002e+007, 0], 1]

Example 2

_ct = currentThrowable player;                // ["HandGrenade", "HandGrenadeMuzzle", [1e+007, 0], 1]
_id = (_ct select 2 select 0) - 1e7;        // 18

See also

selectThrowable · currentWeapon · currentMagazine · currentMuzzle · BIS_fnc_isThrowable