‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_zm_perk_electric_cherry.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\array_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\math_shared;
6 #using scripts\shared\system_shared;
7 #using scripts\shared\util_shared;
8 #using scripts\shared\visionset_mgr_shared;
9 
10 #insert scripts\shared\shared.gsh;
11 #insert scripts\shared\version.gsh;
12 
13 #using scripts\shared\ai\zombie_utility;
14 
15 #using scripts\zm\_util;
16 #using scripts\zm\_zm;
17 #using scripts\zm\_zm_net;
18 #using scripts\zm\_zm_perks;
19 #using scripts\zm\_zm_pers_upgrades;
20 #using scripts\zm\_zm_pers_upgrades_functions;
21 #using scripts\zm\_zm_pers_upgrades_system;
22 #using scripts\zm\_zm_score;
23 #using scripts\zm\_zm_stats;
24 #using scripts\zm\_zm_utility;
25 
26 #insert scripts\zm\_zm_perks.gsh;
27 #insert scripts\zm\_zm_utility.gsh;
28 
29 //TODO update these to proper settings
30 #define ELECTRIC_CHERRY_PERK_COST 10
31 #define ELECTRIC_CHERRY_PERK_BOTTLE_WEAPON "zombie_perk_bottle_cherry"
32 #define ELECTRIC_CHERRY_SHADER "specialty_quickrevive_zombies"
33 #define ELECTRIC_CHERRY_MACHINE_DISABLED_MODEL "p7_zm_vending_nuke" // "p6_zm_vending_electric_cherry_off"
34 #define ELECTRIC_CHERRY_MACHINE_ACTIVE_MODEL "p7_zm_vending_nuke" // "p6_zm_vending_electric_cherry_on"
35 #define ELECTRIC_CHERRY_RADIANT_MACHINE_NAME "vending_electriccherry"
36 #define ELECTRIC_CHERRY_MACHINE_LIGHT_FX "electric_cherry_light"
37 
38 
39 // Global Attack Variables
40 #define ELECTRIC_CHERRY_STUN_CYCLES 4
41 // Last Stand Attack
42 #define ELECTRIC_CHERRY_DOWNED_ATTACK_RADIUS 500
43 #define ELECTRIC_CHERRY_DOWNED_ATTACK_DAMAGE 1000
44 #define ELECTRIC_CHERRY_DOWNED_ATTACK_POINTS 40
45 // Reload Attack
46 #define RELOAD_ATTACK_MIN_RADIUS 32
47 #define RELOAD_ATTACK_MAX_RADIUS 128
48 #define RELOAD_ATTACK_MIN_DAMAGE 1
49 #define RELOAD_ATTACK_MAX_DAMAGE 1045 // Max damage = zombie health at round 10
50 #define RELOAD_ATTACK_POINTS 40
51 #define RELOAD_ATTACK_COOLDOWN_TIMER 3
52 
53 #precache( "fx", "_t6/misc/fx_zombie_cola_revive_on" );
54 #precache( "fx", "dlc1/castle/fx_castle_electric_cherry_down" );
55 
56 #namespace zm_perk_electric_cherry;
57 
58 ‪REGISTER_SYSTEM( "zm_perk_electric_cherry", &‪__init__, undefined )
59 
60 // ELECTRIC CHERRY ( ELECTRIC CHERRY )
61 
62 //-----------------------------------------------------------------------------------
63 // setup
64 //-----------------------------------------------------------------------------------
65 function ‪__init__()
66 {
68 }
69 
71 {
72  // register staminup perk for level
78 
80 
81  if( ‪IS_TRUE( level.custom_electric_cherry_perk_threads ) )
82  {
83  level thread [[ level.custom_electric_cherry_perk_threads ]]();
84  }
85 
87 }
88 
90 {
91  if( IsDefined(level.electric_cherry_precache_override_func) )
92  {
93  [[ level.electric_cherry_precache_override_func ]]();
94  return;
95  }
96 
97  level._effect[‪ELECTRIC_CHERRY_MACHINE_LIGHT_FX] = "_t6/misc/fx_zombie_cola_revive_on";
98 
99  level.machine_assets[‪PERK_ELECTRIC_CHERRY] = SpawnStruct();
100  level.machine_assets[‪PERK_ELECTRIC_CHERRY].weapon = GetWeapon( ‪ELECTRIC_CHERRY_PERK_BOTTLE_WEAPON );
101  level.machine_assets[‪PERK_ELECTRIC_CHERRY].off_model = ‪ELECTRIC_CHERRY_MACHINE_DISABLED_MODEL;
102  level.machine_assets[‪PERK_ELECTRIC_CHERRY].on_model = ‪ELECTRIC_CHERRY_MACHINE_ACTIVE_MODEL;
103 }
104 
106 {
108 }
109 
111 {
113 }
114 
115 function ‪electric_cherry_perk_machine_setup( use_trigger, perk_machine, bump_trigger, collision )
116 {
117  use_trigger.script_sound = "mus_perks_stamin_jingle";
118  use_trigger.script_string = "marathon_perk";
119  use_trigger.script_label = "mus_perks_stamin_sting";
120  use_trigger.target = "vending_marathon";
121  perk_machine.script_string = "marathon_perk";
122  perk_machine.targetname = "vending_marathon";
123  if( IsDefined( bump_trigger ) )
124  {
125  bump_trigger.script_string = "marathon_perk";
126  }
127 }
128 
129 //-----------------------------------------------------------------------------------
130 // functionality
131 //-----------------------------------------------------------------------------------
133 {
134  level._effect[ "electric_cherry_explode" ] = "dlc1/castle/fx_castle_electric_cherry_down";
135 
136  // Last Stand Attack
137  level.custom_laststand_func = &‪electric_cherry_laststand;
138 
139  ‪zombie_utility::set_zombie_var( "tesla_head_gib_chance", 50 );
140 
141  // Perk specific Client Fields
142  ‪clientfield::register( "allplayers", "electric_cherry_reload_fx", ‪VERSION_SHIP, 2, "int" );
143  ‪clientfield::register( "actor", "tesla_death_fx", ‪VERSION_SHIP, 1, "int" );
144  ‪clientfield::register( "vehicle", "tesla_death_fx_veh", ‪VERSION_TU10, 1, "int" ); // Leave at VERSION_TU10
145  ‪clientfield::register( "actor", "tesla_shock_eyes_fx", ‪VERSION_SHIP, 1, "int" );
146  ‪clientfield::register( "vehicle", "tesla_shock_eyes_fx_veh", ‪VERSION_TU10, 1, "int" ); // Leave at VERSION_TU10
147 }
148 
150 {
152 
153  while ( true )
154  {
155  machine = getentarray( "vendingelectric_cherry", "targetname" );
156  machine_triggers = GetEntArray( "vending_electriccherry", "target" );
157 
158  // Show "inactive" models
159  for( i = 0; i < machine.size; i++ )
160  {
161  machine[i] SetModel( ‪ELECTRIC_CHERRY_MACHINE_DISABLED_MODEL );
162  }
163 
164  level thread ‪zm_perks::do_initial_power_off_callback( machine, "electriccherry" );
165  array::thread_all( machine_triggers, &‪zm_perks::set_power_on, false );
166 
167  level waittill( "electric_cherry_on" );
168 
169  for( i = 0; i < machine.size; i++ )
170  {
171  machine[i] SetModel( ‪ELECTRIC_CHERRY_MACHINE_ACTIVE_MODEL );
172  machine[i] vibrate( ( 0, -100, 0 ), 0.3, 0.4, 3 );
173  machine[i] playsound( "zmb_perks_power_on" );
174  machine[i] thread ‪zm_perks::perk_fx( "electriccherry" );
175  machine[i] thread ‪zm_perks::play_loop_on_machine();
176  }
177 
178  level notify( "specialty_grenadepulldeath_power_on" );
179 
180  array::thread_all( machine_triggers, &‪zm_perks::set_power_on, true );
181 
182  level waittill( "electric_cherry_off" );
183 
184  array::thread_all( machine_triggers, &‪zm_perks::turn_perk_off );
185  }
186 }
187 
188 // when host migration occurs, fx don't carry over. If perk machine is on, turn the light back on.
190 {
191  a_electric_cherry_perk_machines = GetEntArray( "vending_electriccherry", "targetname" );
192 
193  foreach( perk_machine in a_electric_cherry_perk_machines )
194  {
195  if( isDefined( perk_machine.model ) && perk_machine.model == ‪ELECTRIC_CHERRY_MACHINE_ACTIVE_MODEL )
196  {
197  perk_machine ‪zm_perks::perk_fx( undefined, true );
198  perk_machine thread ‪zm_perks::perk_fx( "electriccherry" );
199  }
200  }
201 }
202 
203 //-----------------------------------------------------------------------------------
204 // downed player releases a boom
205 //-----------------------------------------------------------------------------------
206 
207 function ‪electric_cherry_laststand() //self = player
208 {
209  VisionSetLastStand( "zombie_last_stand", 1 );
210 
211  if ( IsDefined( self ) )
212  {
213  PlayFX( level._effect[ "electric_cherry_explode" ], self.origin );
214  self PlaySound( "zmb_cherry_explode" );
215  self notify( "electric_cherry_start" );
216 
217  //time for notify to go out
218  wait 0.05;
219 
221  a_zombies = ‪util::get_array_of_closest( self.origin, a_zombies, undefined, undefined, ‪ELECTRIC_CHERRY_DOWNED_ATTACK_RADIUS );
222 
223  for ( i = 0; i < a_zombies.size; i++ )
224  {
225  if ( IsAlive( self ) && IsAlive( a_zombies[ i ] ) )
226  {
227  if ( a_zombies[ i ].health <= ‪ELECTRIC_CHERRY_DOWNED_ATTACK_DAMAGE )
228  {
229  a_zombies[ i ] thread ‪electric_cherry_death_fx();
230 
231  //for achievement tracking
232  if( IsDefined( self.cherry_kills ) )
233  {
234  self.cherry_kills++;
235  }
236 
237  self ‪zm_score::add_to_player_score( ‪ELECTRIC_CHERRY_DOWNED_ATTACK_POINTS ); //add points only if zombie is killed
238  }
239 
240  else
241  {
242  a_zombies[ i ] thread ‪electric_cherry_stun();
243  a_zombies[ i ] thread ‪electric_cherry_shock_fx();
244  }
245 
246  wait 0.1;
247 
248  a_zombies[ i ] DoDamage( ‪ELECTRIC_CHERRY_DOWNED_ATTACK_DAMAGE, self.origin, self, self, "none" );
249  }
250  }
251  self notify( "electric_cherry_end" );
252  }
253 }
254 
255 
256 function ‪electric_cherry_death_fx() //self = zombie
257 {
258  self endon( "death" );
259 
260  self PlaySound( "zmb_elec_jib_zombie" );
261 
262  if ( !‪IS_TRUE( self.head_gibbed ) )
263  {
264  if( IsVehicle( self ) )
265  {
266  self ‪clientfield::set( "tesla_shock_eyes_fx_veh", 1 );
267  }
268  else
269  {
270  self ‪clientfield::set( "tesla_shock_eyes_fx", 1 );
271  }
272  }
273  else
274  {
275  if( IsVehicle( self ) )
276  {
277  self ‪clientfield::set( "tesla_death_fx_veh", 1 );
278  }
279  else
280  {
281  self ‪clientfield::set( "tesla_death_fx", 1 );
282  }
283  }
284 }
285 
286 
287 function ‪electric_cherry_shock_fx() //self = zombie
288 {
289  self endon( "death" );
290 
291  if( IsVehicle( self ) )
292  {
293  self ‪clientfield::set( "tesla_shock_eyes_fx_veh", 1 );
294  }
295  else
296  {
297  self ‪clientfield::set( "tesla_shock_eyes_fx", 1 );
298  }
299 
300  self PlaySound( "zmb_elec_jib_zombie" );
301 
302  self waittill( "stun_fx_end" );
303 
304  if( IsVehicle( self ) )
305  {
306  self ‪clientfield::set( "tesla_shock_eyes_fx_veh", 0 );
307  }
308  else
309  {
310  self ‪clientfield::set( "tesla_shock_eyes_fx", 0 );
311  }
312 }
313 
314 
315 function ‪electric_cherry_stun() //self = zombie
316 {
317  self endon("death");
318 
319  self notify( "stun_zombie" );
320  self endon( "stun_zombie" );
321 
322  if ( self.health <= 0 )
323  {
324  return;
325  }
326 
327  //only stun the zombie if they are not in the find_flesh state
328  if ( self.ai_state !== "zombie_think" )
329  {
330  return;
331  }
332 
333  // This immobilizes zombies because they're being shocked by electricity
334  self.zombie_tesla_hit = true;
335  self.ignoreall = true;
336 
337  wait ‪ELECTRIC_CHERRY_STUN_CYCLES; // wait time for stun to hold.
338 
339  if( isdefined( self ) )
340  {
341  //set them back on course
342  self.zombie_tesla_hit = false;
343  self.ignoreall = false;
344 
345  self notify( "stun_fx_end" );
346  }
347 }
348 
349 //-----------------------------------------------------------------------------------
350 // Release an explosion when the player reloads
351 //-----------------------------------------------------------------------------------
352 
353 function ‪electric_cherry_reload_attack() // self = player
354 {
355  self endon( "death" );
356  self endon( "disconnect" );
357  self endon( ‪PERK_ELECTRIC_CHERRY + "_stop" );
358 
359  self.wait_on_reload = [];
360  self.consecutive_electric_cherry_attacks = 0;
361 
362  while( true )
363  {
364  // Wait for the player to reload
365  self waittill("reload_start");
366 
367  current_weapon = self GetCurrentWeapon();
368 
369  // Don't use the perk if the weapon is waiting to be reloaded
370  if( IsInArray( self.wait_on_reload, current_weapon ) )
371  {
372  continue;
373  }
374 
375  // Add this weapon to the list so we know it needs to be reloaded before the perk can be used for again
376  self.wait_on_reload[self.wait_on_reload.size] = current_weapon;
377 
378  self.consecutive_electric_cherry_attacks++;
379 
380  // Get the percentage of bullets left in the clip at the time the weapon is reloaded
381 // n_clip_current = self GetWeaponAmmoClip( str_current_weapon );
382 // n_clip_max = WeaponClipSize( str_current_weapon );
383  n_clip_current = 1;
384  n_clip_max = 10;
385  n_fraction = n_clip_current/n_clip_max;
386 
387  perk_radius = ‪math::linear_map( n_fraction, 1.0, 0.0, ‪RELOAD_ATTACK_MIN_RADIUS, ‪RELOAD_ATTACK_MAX_RADIUS );
389 
390  // Kick off a thread that will tell us when the weapon has been reloaded.
391  self thread ‪check_for_reload_complete( current_weapon );
392 
393  // Do the Electric Cherry Perk attack. Logic should be the same as the "Laststand" attack.
394  if ( IsDefined( self ) )
395  {
396  // If the attack is being spammed, limit the number of zombies the attack can affect
397  switch( self.consecutive_electric_cherry_attacks )
398  {
399  case 0:
400  case 1:
401  n_zombie_limit = undefined;
402  break;
403 
404  case 2:
405  n_zombie_limit = 8;
406  break;
407 
408  case 3:
409  n_zombie_limit = 4;
410  break;
411 
412  case 4:
413  n_zombie_limit = 2;
414  break;
415 
416  default:
417  n_zombie_limit = 0;
418  }
419 
420  // Start the Cooldown Timer
421  self thread ‪electric_cherry_cooldown_timer( current_weapon );
422 
423  if( IsDefined(n_zombie_limit) && (n_zombie_limit == 0) )
424  {
425  // The player has spammed the attack too much
426  // So don't actually perform the attack
427  // This prevents us from seeing/hearing the attack when it won't affect any zombies
428  continue;
429  }
430 
431  self thread ‪electric_cherry_reload_fx( n_fraction );
432  self notify( "electric_cherry_start" );
433  self PlaySound( "zmb_cherry_explode" );
434 
436  a_zombies = ‪util::get_array_of_closest( self.origin, a_zombies, undefined, undefined, perk_radius );
437 
438  n_zombies_hit = 0;
439 
440  for ( i = 0; i < a_zombies.size; i++ )
441  {
442  if ( IsAlive( self ) && IsAlive( a_zombies[ i ] ) )
443  {
444  // If the limit of zombies is undefined, keep going and hit all zombies we can
445  if( IsDefined( n_zombie_limit ) )
446  {
447  // If the we're under the limit, increment the count of zombies
448  if( n_zombies_hit < n_zombie_limit )
449  {
450  n_zombies_hit++;
451  }
452  else
453  {
454  // If we're at the limit of zombies, don't kill any more zombies
455  break;
456  }
457  }
458 
459  if ( a_zombies[ i ].health <= perk_dmg )
460  {
461  a_zombies[ i ] thread ‪electric_cherry_death_fx();
462 
463  //for achievement tracking
464  if( IsDefined( self.cherry_kills ) )
465  {
466  self.cherry_kills++;
467  }
468 
469  self ‪zm_score::add_to_player_score( ‪RELOAD_ATTACK_POINTS ); //add points only if zombie is killed
470  }
471  else
472  {
473  if( !IsDefined(a_zombies[ i ].is_brutus) )
474  {
475  a_zombies[ i ] thread ‪electric_cherry_stun();
476  }
477  a_zombies[ i ] thread ‪electric_cherry_shock_fx();
478  }
479 
480  wait 0.1;
481 
482  if( isdefined( a_zombies[ i ] ) && IsAlive( a_zombies[ i ] ) ) // need to check again since we're post-wait
483  {
484  a_zombies[ i ] DoDamage( perk_dmg, self.origin, self, self, "none" );
485  }
486  }
487  }
488 
489  self notify( "electric_cherry_end" );
490  }
491  }
492 }
493 
494 function ‪electric_cherry_cooldown_timer( current_weapon ) // self = player
495 {
496  self notify( "electric_cherry_cooldown_started" );
497  self endon( "electric_cherry_cooldown_started" );
498  self endon( "death" );
499  self endon( "disconnect" );
500 
501  // Start the timer when the player reloads (when electric cherry attack starts)
502  // Cooldown time is equal to the weapon's reload time plus the global cooldown
503  //n_reload_time = WeaponReloadTime( current_weapon ); // TODO
504  n_reload_time = 0.25;
505  if( self HasPerk( "specialty_fastreload" ) )
506  {
507  n_reload_time *= GetDvarFloat( "perk_weapReloadMultiplier" );
508  }
509 
510  n_cooldown_time = (n_reload_time + ‪RELOAD_ATTACK_COOLDOWN_TIMER);
511 
512  wait n_cooldown_time;
513 
514  self.consecutive_electric_cherry_attacks = 0;
515 }
516 
517 function ‪check_for_reload_complete( weapon ) // self = player
518 {
519  self endon( "death" );
520  self endon( "disconnect" );
521  //self endon( "weapon_change_complete" );
522  self endon( "player_lost_weapon_" + weapon.name );
523 
524  // Thread to watch for the case where this weapon gets replaced
525  self thread ‪weapon_replaced_monitor( weapon );
526 
527  while( 1 )
528  {
529  // Wait for the player to complete a reload
530  self waittill( "reload" );
531 
532  // If the weapon that just got reloaded is the same as the one that was used for the electric cherry perk
533  // Kill off this thread and remove this weapon's name from the player's wait_on_reload list
534  // This allows the player to use the Electric Cherry Reload Attack with this weapon again!
535  current_weapon = self GetCurrentWeapon();
536  if( current_weapon == weapon )
537  {
538  ArrayRemoveValue( self.wait_on_reload, weapon );
539  self notify( "weapon_reload_complete_" + weapon.name );
540  break;
541  }
542  }
543 }
544 
545 function ‪weapon_replaced_monitor( weapon ) // self = player
546 {
547  self endon( "death" );
548  self endon( "disconnect" );
549  self endon( "weapon_reload_complete_" + weapon.name );
550 
551  while( 1 )
552  {
553  // Wait for the player to change weapons (swap weapon, wall buy, magic box, etc.)
554  self waittill( "weapon_change" );
555 
556  // If the weapon that we previously used for the Electric Cherry Reload Attack is no longer equipped
557  // Kill off this thread and remove this weapon's name from the player's wait_on_reload list
558  // This handles the case when a player cancels a reload, then replaces this weapon
559  // Ensures that when the player re-aquires the weapon, he has a fresh start and can use the Electric Cherry perk immediately.
560  primaryWeapons = self GetWeaponsListPrimaries();
561  if( !IsInArray( primaryWeapons, weapon ) )
562  {
563  self notify( "player_lost_weapon_" + weapon.name );
564  ArrayRemoveValue( self.wait_on_reload, weapon );
565  break;
566  }
567  }
568 }
569 
570 function ‪electric_cherry_reload_fx( n_fraction )
571 {
572  if( n_fraction >= 0.67 )
573  {
574  CodeSetClientField( self, "electric_cherry_reload_fx", 1 );
575  }
576  else if( (n_fraction >= 0.33) && (n_fraction < 0.67) )
577  {
578  CodeSetClientField( self, "electric_cherry_reload_fx", 2 );
579  }
580  else
581  {
582  CodeSetClientField( self, "electric_cherry_reload_fx", 3 );
583  }
584 
585  wait ( 1.0 );
586 
587  CodeSetClientField( self, "electric_cherry_reload_fx", 0 );
588 }
589 
591 //Perk lost func
593 function ‪electric_cherry_perk_lost( b_pause, str_perk, str_result )
594 {
595  self notify( ‪PERK_ELECTRIC_CHERRY + "_stop" );
596 }
597 
598 
‪ELECTRIC_CHERRY_DOWNED_ATTACK_RADIUS
‪#define ELECTRIC_CHERRY_DOWNED_ATTACK_RADIUS
Definition: _zm_perk_electric_cherry.gsc:42
‪ELECTRIC_CHERRY_MACHINE_ACTIVE_MODEL
‪#define ELECTRIC_CHERRY_MACHINE_ACTIVE_MODEL
Definition: _zm_perk_electric_cherry.gsc:34
‪register_perk_clientfields
‪function register_perk_clientfields(str_perk, func_clientfield_register, func_code_callback)
Definition: _zm_perks.csc:96
‪enable_electric_cherry_perk_for_level
‪function enable_electric_cherry_perk_for_level()
Definition: _zm_perk_electric_cherry.gsc:70
‪RELOAD_ATTACK_MAX_RADIUS
‪#define RELOAD_ATTACK_MAX_RADIUS
Definition: _zm_perk_electric_cherry.gsc:47
‪ELECTRIC_CHERRY_MACHINE_DISABLED_MODEL
‪#define ELECTRIC_CHERRY_MACHINE_DISABLED_MODEL
Definition: _zm_perk_electric_cherry.gsc:33
‪ELECTRIC_CHERRY_MACHINE_LIGHT_FX
‪#define ELECTRIC_CHERRY_MACHINE_LIGHT_FX
Definition: _zm_perk_electric_cherry.gsc:36
‪ELECTRIC_CHERRY_DOWNED_ATTACK_DAMAGE
‪#define ELECTRIC_CHERRY_DOWNED_ATTACK_DAMAGE
Definition: _zm_perk_electric_cherry.gsc:43
‪RELOAD_ATTACK_POINTS
‪#define RELOAD_ATTACK_POINTS
Definition: _zm_perk_electric_cherry.gsc:50
‪VERSION_TU10
‪#define VERSION_TU10
Definition: version.gsh:59
‪electric_cherry_perk_machine_think
‪function electric_cherry_perk_machine_think()
Definition: _zm_perk_electric_cherry.gsc:149
‪add_to_player_score
‪function add_to_player_score(points, b_add_to_total=true, str_awarded_by="")
Definition: _zm_score.gsc:521
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪set_zombie_var
‪function set_zombie_var(zvar, value, is_float=false, column=1, is_team_based=false)
Definition: zombie_utility.gsc:1434
‪register_perk_basic_info
‪function register_perk_basic_info(str_perk, str_alias, n_perk_cost, str_hint_string, w_perk_bottle_weapon)
Definition: _zm_perks.gsc:1820
‪turn_perk_off
‪function turn_perk_off(ishidden)
Definition: _zm_perks.gsc:240
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪get_round_enemy_array
‪function get_round_enemy_array()
Definition: zombie_utility.gsc:2024
‪electric_cherry_laststand
‪function electric_cherry_laststand()
Definition: _zm_perk_electric_cherry.gsc:207
‪set_power_on
‪function set_power_on(state)
Definition: _zm_perks.gsc:233
‪play_loop_on_machine
‪function play_loop_on_machine()
Definition: _zm_perks.gsc:265
‪ELECTRIC_CHERRY_STUN_CYCLES
‪#define ELECTRIC_CHERRY_STUN_CYCLES
Definition: _zm_perk_electric_cherry.gsc:40
‪electric_cherry_register_clientfield
‪function electric_cherry_register_clientfield()
Definition: _zm_perk_electric_cherry.gsc:105
‪register_perk_machine
‪function register_perk_machine(str_perk, func_perk_machine_setup, func_perk_machine_thread)
Definition: _zm_perks.gsc:1849
‪RELOAD_ATTACK_MIN_RADIUS
‪#define RELOAD_ATTACK_MIN_RADIUS
Definition: _zm_perk_electric_cherry.gsc:46
‪electric_cherry_cooldown_timer
‪function electric_cherry_cooldown_timer(current_weapon)
Definition: _zm_perk_electric_cherry.gsc:494
‪ELECTRIC_CHERRY_RADIANT_MACHINE_NAME
‪#define ELECTRIC_CHERRY_RADIANT_MACHINE_NAME
Definition: _zm_perk_electric_cherry.gsc:35
‪ELECTRIC_CHERRY_DOWNED_ATTACK_POINTS
‪#define ELECTRIC_CHERRY_DOWNED_ATTACK_POINTS
Definition: _zm_perk_electric_cherry.gsc:44
‪electric_cherry_shock_fx
‪function electric_cherry_shock_fx()
Definition: _zm_perk_electric_cherry.gsc:287
‪linear_map
‪function linear_map(num, min_a, max_a, min_b, max_b)
Definition: math_shared.csc:43
‪PERK_ELECTRIC_CHERRY
‪#define PERK_ELECTRIC_CHERRY
Definition: _zm_perks.gsh:31
‪weapon_replaced_monitor
‪function weapon_replaced_monitor(weapon)
Definition: _zm_perk_electric_cherry.gsc:545
‪get_array_of_closest
‪function get_array_of_closest(org, array, excluders, max, maxdist)
Definition: util_shared.gsc:2943
‪register_perk_precache_func
‪function register_perk_precache_func(str_perk, func_precache)
Definition: _zm_perks.gsc:1900
‪RELOAD_ATTACK_MIN_DAMAGE
‪#define RELOAD_ATTACK_MIN_DAMAGE
Definition: _zm_perk_electric_cherry.gsc:48
‪electric_cherry_precache
‪function electric_cherry_precache()
Definition: _zm_perk_electric_cherry.gsc:89
‪ELECTRIC_CHERRY_PERK_COST
‪#define ELECTRIC_CHERRY_PERK_COST
Definition: _zm_perk_electric_cherry.gsc:30
‪REGISTER_SYSTEM
‪#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition: shared.gsh:204
‪electric_cherry_perk_lost
‪function electric_cherry_perk_lost(b_pause, str_perk, str_result)
Definition: _zm_perk_electric_cherry.gsc:593
‪RELOAD_ATTACK_MAX_DAMAGE
‪#define RELOAD_ATTACK_MAX_DAMAGE
Definition: _zm_perk_electric_cherry.gsc:49
‪register_perk_threads
‪function register_perk_threads(str_perk, func_give_player_perk, func_take_player_perk)
Definition: _zm_perks.gsc:1924
‪register_perk_host_migration_params
‪function register_perk_host_migration_params(str_perk, str_radiant_name, str_effect_name)
Definition: _zm_perks.gsc:1986
‪electric_cherry_reload_attack
‪function electric_cherry_reload_attack()
Definition: _zm_perk_electric_cherry.gsc:353
‪PERK_CLIENTFIELD_ELECTRIC_CHERRY
‪#define PERK_CLIENTFIELD_ELECTRIC_CHERRY
Definition: _zm_perks.gsh:18
‪electric_cherry_stun
‪function electric_cherry_stun()
Definition: _zm_perk_electric_cherry.gsc:315
‪init_electric_cherry
‪function init_electric_cherry()
Definition: _zm_perk_electric_cherry.gsc:132
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪electric_cherry_death_fx
‪function electric_cherry_death_fx()
Definition: _zm_perk_electric_cherry.gsc:256
‪electric_cherry_reload_fx
‪function electric_cherry_reload_fx(n_fraction)
Definition: _zm_perk_electric_cherry.gsc:570
‪electric_cherry_perk_machine_setup
‪function electric_cherry_perk_machine_setup(use_trigger, perk_machine, bump_trigger, collision)
Definition: _zm_perk_electric_cherry.gsc:115
‪__init__
‪function __init__()
Definition: _zm_perk_electric_cherry.gsc:65
‪electric_cherry_set_clientfield
‪function electric_cherry_set_clientfield(state)
Definition: _zm_perk_electric_cherry.gsc:110
‪set_player_uimodel
‪function set_player_uimodel(str_field_name, n_value)
Definition: clientfield_shared.gsc:75
‪electric_cherry_host_migration_func
‪function electric_cherry_host_migration_func()
Definition: _zm_perk_electric_cherry.gsc:189
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪do_initial_power_off_callback
‪function do_initial_power_off_callback(machine_array, perkname)
Definition: _zm_perks.gsc:198
‪check_for_reload_complete
‪function check_for_reload_complete(weapon)
Definition: _zm_perk_electric_cherry.gsc:517
‪ELECTRIC_CHERRY_PERK_BOTTLE_WEAPON
‪#define ELECTRIC_CHERRY_PERK_BOTTLE_WEAPON
Definition: _zm_perk_electric_cherry.gsc:31
‪perk_fx
‪function perk_fx(fx, turnOffFx)
Definition: _zm_perks.gsc:280
‪RELOAD_ATTACK_COOLDOWN_TIMER
‪#define RELOAD_ATTACK_COOLDOWN_TIMER
Definition: _zm_perk_electric_cherry.gsc:51