mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
31 lines
760 B
Plaintext
31 lines
760 B
Plaintext
/****************************************************************
|
|
File: UPSMON_throw_grenade.sqf
|
|
Author: MONSADA
|
|
|
|
Description:
|
|
Throw a grenade
|
|
Parameter(s):
|
|
|
|
Returns:
|
|
|
|
****************************************************************/
|
|
private["_target","_npc","_time"];
|
|
|
|
_npc = _this select 0;
|
|
_target = _this select 1;
|
|
|
|
if (!alive _npc || (vehicle _npc) != _npc || !canmove _npc) exitwith{};
|
|
[_npc,_target] call UPSMON_dowatch;
|
|
sleep 0.5;
|
|
|
|
hint "THROW";
|
|
_npc switchmove "AwopPercMstpSgthWnonDnon_end";
|
|
_npc addmagazine "HandGrenade_Stone";
|
|
_npc selectWeapon "throw";
|
|
sleep .1;
|
|
_npc forceWeaponFire ["HandGrenade_Stone","HandGrenade_Stone"];
|
|
_time = time + 5;
|
|
_npc setvariable ["UPSMON_ThrowStone",_time];
|
|
sleep 1;
|
|
_npc switchmove "";
|
|
_npc dowatch ObjNull; |