2015-01-14 11:07:53 +00:00
|
|
|
//Waits for the grenade fuze to trigger and 'explode'
|
|
|
|
|
2015-01-14 09:06:47 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
_projectile = (_this select 0) select 0;
|
|
|
|
_waitUntilTime = (_this select 0) select 1;
|
|
|
|
|
|
|
|
if (_waitUntilTime > time) exitWith {};
|
|
|
|
|
|
|
|
//remove frameEH
|
|
|
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
|
|
|
|
|
|
|
if (alive _projectile) then {
|
|
|
|
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
|
2015-01-17 06:39:46 +00:00
|
|
|
|
2015-01-14 09:06:47 +00:00
|
|
|
_affected = _projectile nearEntities ["CAManBase", 50];
|
2015-01-17 06:39:46 +00:00
|
|
|
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
|
2015-01-14 20:43:43 +00:00
|
|
|
};
|