1 #using scripts\codescripts\struct;
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\challenges_shared;
5 #using scripts\shared\scoreevents_shared;
6 #using scripts\shared\system_shared;
7 #using scripts\shared\util_shared;
8 #using scripts\shared\weapons\_weaponobjects;
10 #insert scripts\shared\shared.gsh;
12 #precache( "fx", "weapon/fx_c4_light_orng" );
13 #precache( "fx", "weapon/fx_c4_light_blue" );
15 #namespace satchel_charge;
19 level._effect[
"satchel_charge_enemy_light"] =
"weapon/fx_c4_light_orng";
20 level._effect[
"satchel_charge_friendly_light"] =
"weapon/fx_c4_light_blue";
28 watcher.altDetonate =
true;
29 watcher.watchForFire =
true;
30 watcher.hackable =
true;
31 watcher.hackerToolRadius = level.equipmentHackerToolRadius;
32 watcher.hackerToolTimeMs = level.equipmentHackerToolTimeMs;
33 watcher.headIcon =
false;
38 watcher.altWeapon = GetWeapon(
"satchel_charge_detonator" );
39 watcher.ownerGetsAssist =
true;
40 watcher.detonateStationary =
true;
41 watcher.detonationDelay = GetDvarFloat(
"scr_satchel_detonation_delay", 0.0 );
42 watcher.detonationSound =
"wpn_claymore_alert";
43 watcher.proximityAlarmActivateSound =
"uin_c4_enemy_detection_alert";
44 watcher.immunespecialty =
"specialty_immunetriggerc4";
49 if ( IsDefined( weapon ) && weapon.isValid )
51 if ( isdefined( attacker ) )
66 self endon(
"death" );
70 if( !
IS_TRUE(
self.previouslyHacked ) )
72 if ( IsDefined( owner ) )
74 owner AddWeaponStat(
self.weapon,
"used", 1 );
77 self playloopsound(
"uin_c4_air_alarm_loop" );
80 delayTimeSec =
self.weapon.proximityalarmactivationdelay / 1000;
82 if ( delayTimeSec > 0 )
86 self stoploopsound( 0.1 );