Introduced in

Version:2.15

Description

Description:Starts a countdown timer for a satchel charge.

This only works with the type vbs2_mag_m183satchel (class pipebomb is not supported).

To get the object of a player-placed charge, the following three methods can be used:

  • Attach a Fired to the player, and use the object when the magazine is vbs2_mag_m183satchel:
    player addEventHandler ["Fired","if (_this select 5=='vbs2_mag_m183satchel') then {bomb = _this select 6}"]
  • Look for: nearestObjects [player,["vbs2_iedbase"],5]
  • Look for: allStaticVehicles "_x isKindOf 'vbs2_iedbase'"

To create a satchel charge using a script (instead of the player placing it), create the associated ammo:

bomb="vbs2_ammo_E_m112DemoCharge" createVehicle (player modelToWorld [0,2,0])

Syntax

Syntax:bomb setAmmoTimer timeout
Parameters:
  • bomb: Object - Satchel charge of type vbs2_mag_m183satchel.
  • timeout: Number - Seconds until detonation (0 - immediately).
Return Value:Nothing

Examples

Examples:
bomb setAmmoTimer 10

Additional Information

See also: getAmmoTimer, TouchOff
Multiplayer: 
Problems: 

Notes