Arma 3 Scripting

triggerAmmo

  • Local argument
  • Arma 3 v1.92

Command · Markdown · JSON · original wiki page

Description

Triggers a munition such as shells, bullets, missiles, rockets, mines and bombs (shotSubmunition/shotShell/shotBullet/shotMissile/shotRocket) as if it did hit. If ammo uses submunition, then creation of submunition will be triggered. Since Arma 3 v 2.22 it is possible to manipulate mine timer, cook grenades and alter missile trigger distance.

Syntax

Syntax 1

triggerAmmo munition

Parameters:

Returns: Nothing

Syntax 2

since arma3 2.22

triggerAmmo [munition, timeLeft, distanceLeft]

Parameters:

Returns: Nothing

Examples

Example 1

triggerAmmo bomb1;

Example 2

player addEventHandler ["FiredMan", {triggerAmmo [_this select 6, 1]}]; // explodes handgrenade or sets smoke on smokegrenade 1 sec after the throw.

See also

getShotParents · Arma 3: Event Handlers