‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
All Data Structures Files Functions Variables Macros
_zm_ai_raps.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\aat_shared;
4 #using scripts\shared\array_shared;
5 #using scripts\shared\flag_shared;
6 #using scripts\shared\spawner_shared;
7 #using scripts\shared\system_shared;
8 #using scripts\shared\trigger_shared;
9 #using scripts\shared\util_shared;
10 #using scripts\shared\vehicle_shared;
11 #using scripts\shared\vehicle_ai_shared;
12 #using scripts\shared\vehicles\_raps;
13 #using scripts\shared\clientfield_shared;
14 #using scripts\shared\visionset_mgr_shared;
15 
16 #insert scripts\shared\shared.gsh;
17 #insert scripts\shared\weapons\grapple.gsh;
18 
19 #using scripts\zm\_util;
20 #using scripts\zm\_zm;
21 #using scripts\zm\_zm_audio;
22 #using scripts\zm\_zm_net;
23 #using scripts\zm\_zm_powerups;
24 #using scripts\zm\_zm_score;
25 #using scripts\zm\_zm_spawner;
26 #using scripts\zm\_zm_stats;
27 #using scripts\zm\_zm_utility;
28 
29 #using scripts\shared\ai\zombie_utility;
30 
31 #insert scripts\shared\aat_zm.gsh;
32 #insert scripts\shared\archetype_shared\archetype_shared.gsh;
33 #insert scripts\zm\_zm_utility.gsh;
34 #insert scripts\shared\version.gsh;
35 #insert scripts\zm\_zm_ai_raps.gsh;
36 
37 #precache( "fx", "zombie/fx_meatball_trail_sky_zod_zmb" );
38 #precache( "fx", "zombie/fx_meatball_impact_ground_tell_zod_zmb" );
39 #precache( "fx", "zombie/fx_meatball_portal_sky_zod_zmb" );
40 //#precache( "fx", "zombie/fx_raps_eyes_zmb" );
41 #precache( "fx", "zombie/fx_meatball_impact_ground_zod_zmb" );
42 #precache( "fx", "zombie/fx_meatball_trail_ground_zod_zmb" );
43 #precache( "fx", "zombie/fx_meatball_explo_zod_zmb" );
44 
45 // Number of RAPs to spawn, accurately weighted for the number of players
46 #define N_NUM_RAPS_PER_ROUND_1PLAYER 10 // 10
47 #define N_NUM_RAPS_PER_ROUND_2PLAYER 18 // 18
48 #define N_NUM_RAPS_PER_ROUND_3PLAYER 28 // 34
49 #define N_NUM_RAPS_PER_ROUND_4PLAYER 34 // 44
50 
51 #define N_RAPS_HEALTH_INCREASE 50 // Amount to increase RAPS health
52 #define N_RAPS_HEALTH_MAX 1600 // Maximum health
53 #define N_RAPS_KILL_POINTS 70 // Points per kill
54 
55 #define N_RAPS_DROP_HEIGHT_MAX 720 // Maximum height to fall from
56 #define N_RAPS_DROP_SPEED 720 // Fall speed Units/sec
57 
58 #define N_RAPS_SPAWN_DELAY_1P 2.25 // Delay between spawns 1st round
59 #define N_RAPS_SPAWN_DELAY_2P 1.75 // Delay between spawns 2nd round
60 #define N_RAPS_SPAWN_DELAY_3P 1.25 // Delay between spawns 3rd round
61 #define N_RAPS_SPAWN_DELAY_4P 0.75 // Delay between spawns thereafter
62 
63 
64 #namespace zm_ai_raps;
65 
66 
67 //*****************************************************************************
68 //*****************************************************************************
69 
70 function ‪init()
71 {
72  level.raps_enabled = true;
73  level.raps_rounds_enabled = false;
74  level.raps_round_count = 1;
75 
76  level.raps_spawners = [];
77 
78  level ‪flag::init( "raps_round" );
79  level ‪flag::init( "raps_round_in_progress" );
80 
81  level.melee_range_sav = GetDvarString( "ai_meleeRange" );
82  level.melee_width_sav = GetDvarString( "ai_meleeWidth" );
83  level.melee_height_sav = GetDvarString( "ai_meleeHeight" );
84 
85  ‪DEFAULT( level.vsmgr_prio_overlay_zm_raps_round, ‪ZM_ELEMENTAL_VISION_OVERLAY_PRIORITY );
86 
87  ‪clientfield::register( "toplayer", "elemental_round_fx", ‪VERSION_SHIP, 1, "counter" );
89 
91 
92  level._effect[ "raps_meteor_fire" ] = "zombie/fx_meatball_trail_sky_zod_zmb";
93  level._effect[ "raps_ground_spawn" ] = "zombie/fx_meatball_impact_ground_tell_zod_zmb";
94  level._effect[ "raps_portal" ] = "zombie/fx_meatball_portal_sky_zod_zmb";
95  level._effect[ "raps_gib" ] = "zombie/fx_meatball_explo_zod_zmb";
96  level._effect[ "raps_trail_blood" ] = "zombie/fx_meatball_trail_ground_zod_zmb";
97  level._effect[ "raps_impact" ] = "zombie/fx_meatball_impact_ground_zod_zmb";
98 
99  // AAT IMMUNITIES
100  level thread ‪aat::register_immunity( ‪ZM_AAT_BLAST_FURNACE_NAME, ‪ARCHETYPE_RAPS, false, true, false );
101  level thread ‪aat::register_immunity( ‪ZM_AAT_DEAD_WIRE_NAME, ‪ARCHETYPE_RAPS, true, true, true );
102  level thread ‪aat::register_immunity( ‪ZM_AAT_FIRE_WORKS_NAME, ‪ARCHETYPE_RAPS, true, true, true );
103  level thread ‪aat::register_immunity( ‪ZM_AAT_THUNDER_WALL_NAME, ‪ARCHETYPE_RAPS, false, false, true );
104  level thread ‪aat::register_immunity( ‪ZM_AAT_TURNED_NAME, ‪ARCHETYPE_RAPS, true, true, true );
105 
106  // Init raps targets - mainly for testing purposes.
107  // If you spawn a raps without having a raps round, you'll get SREs on hunted_by.
109 }
110 
111 
112 //*****************************************************************************
113 // If you want to enable raps rounds, then call this.
114 // - Specify an override func if needed.
115 //*****************************************************************************
116 
118 {
119  level.raps_rounds_enabled = true;
120 
121  if( !isdefined( level.raps_round_track_override ) )
122  {
123  level.raps_round_track_override = &‪raps_round_tracker;
124  }
125 
126  level thread [[level.raps_round_track_override]]();
127 }
128 
129 
130 //*****************************************************************************
131 // Initialization
132 //*****************************************************************************
133 
135 {
136  level.raps_spawners = getEntArray( "zombie_raps_spawner", "script_noteworthy" );
137  later_raps = getentarray("later_round_raps_spawners", "script_noteworthy" );
138  level.raps_spawners = ArrayCombine( level.raps_spawners, later_raps, true, false );
139 
140  if( level.raps_spawners.size == 0 )
141  {
142  return;
143  }
144 
145  for( i = 0; i < level.raps_spawners.size; i++ )
146  {
147  if ( ‪zm_spawner::is_spawner_targeted_by_blocker( level.raps_spawners[i] ) )
148  {
149  level.raps_spawners[i].is_enabled = false;
150  }
151  else
152  {
153  level.raps_spawners[i].is_enabled = true;
154  level.raps_spawners[i].script_forcespawn = true;
155  }
156  }
157 
158  assert( level.raps_spawners.size > 0 );
159  level.n_raps_health = 100;
160 
161  vehicle::add_main_callback( "spawner_enemy_zombie_vehicle_raps_suicide", &‪raps_init );
162 }
163 
164 
165 //*****************************************************************************
166 // Checks at the start of a round if its time for a raps round
167 //*****************************************************************************
168 
170 {
171  level.raps_round_count = 1;
172 
173  // PI_CHANGE_BEGIN - JMA - making raps rounds random between round 5 thru 7
174  // NOTE: RandomIntRange returns a random integer r, where min <= r < max
175  level.n_next_raps_round = RandomIntRange( 9, 11 );
176  // PI_CHANGE_END
177 
178  old_spawn_func = level.round_spawn_func;
179  old_wait_func = level.round_wait_func;
180 
181  while ( 1 )
182  {
183  level waittill ( "between_round_over" );
184 
185  /#
186  if( GetDvarInt( "force_raps" ) > 0 )
187  {
188  level.n_next_raps_round= level.round_number;
189  }
190  #/
191 
192  if( level.round_number == level.n_next_raps_round )
193  {
194  level.sndMusicSpecialRound = true;
195  old_spawn_func = level.round_spawn_func;
196  old_wait_func = level.round_wait_func;
197 
199 
200  level.round_spawn_func = &‪raps_round_spawning;
201  level.round_wait_func = &‪raps_round_wait_func;
202 
203  // Get the next raps round
204  if( isdefined(level.zm_custom_get_next_raps_round) )
205  {
206  level.n_next_raps_round = [[level.zm_custom_get_next_raps_round]]();
207  }
208  else
209  {
210  // Alternating with Wasps, so every other special round...there's probably a better way to do this
211  level.n_next_raps_round = 10 + (level.raps_round_count * 10) + RandomIntRange( -1, 1 );
212  }
213 
214  /#
215  GetPlayers()[0] iprintln( "Next raps round: " + level.n_next_raps_round);
216  #/
217  }
218  else if ( level ‪flag::get( "raps_round" ) )
219  {
221  level.round_spawn_func = old_spawn_func;
222  level.round_wait_func = old_wait_func;
223  level.raps_round_count++;
224  }
225  }
226 }
227 
228 
229 //*****************************************************************************
230 //*****************************************************************************
231 
233 {
234  level ‪flag::set( "raps_round" );
235  level ‪flag::set( "special_round" );
236 
237  if(!isdefined (level.rapsround_nomusic))
238  {
239  level.rapsround_nomusic = 0;
240  }
241  level.rapsround_nomusic = 1;
242  level notify( "raps_round_starting" );
243  level thread ‪zm_audio::sndMusicSystem_PlayState( "meatball_start" );
244 
245  if(isdefined(level.raps_melee_range))
246  {
247  SetDvar( "ai_meleeRange", level.raps_melee_range );
248  }
249  else
250  {
251  SetDvar( "ai_meleeRange", 100 );
252  }
253 }
254 
255 
256 //*****************************************************************************
257 //*****************************************************************************
258 
260 {
261  level ‪flag::clear( "raps_round" );
262  level ‪flag::clear( "special_round" );
263 
264  //zm_utility::play_sound_2D( "mus_zombie_raps_end" );
265  if(!isdefined (level.rapsround_nomusic))
266  {
267  level.rapsround_nomusic = 0;
268  }
269  level.rapsround_nomusic = 0;
270  level notify( "raps_round_ending" );
271 
272  SetDvar( "ai_meleeRange", level.melee_range_sav );
273  SetDvar( "ai_meleeWidth", level.melee_width_sav );
274  SetDvar( "ai_meleeHeight", level.melee_height_sav );
275 }
276 
277 
278 //*****************************************************************************
279 //*****************************************************************************
280 
282 {
283  level endon( "intermission" );
284  level endon( "raps_round" );
285 
286  level.raps_targets = GetPlayers();
287  for( i = 0 ; i < level.raps_targets.size; i++ )
288  {
289  level.raps_targets[i].hunted_by = 0;
290  }
291 
292  level endon( "restart_round" );
293  level endon( "kill_round" );
294 
295 /#
296  if ( GetDvarInt( "zombie_cheat" ) == 2 || GetDvarInt( "zombie_cheat" ) >= 4 )
297  {
298  return;
299  }
300 #/
301 
302  if( level.intermission )
303  {
304  return;
305  }
306 
307  array::thread_all( level.players,&‪play_raps_round );
308 
309  // Calculate wave size
310  n_wave_count = ‪get_raps_spawn_total();
311 
312  // Health increases on round basis
314 
315  level.zombie_total = Int( n_wave_count );
316 
317 /#
318  if( GetDvarString( "force_raps" ) != "" && GetDvarInt( "force_raps" ) > 0 )
319  {
320  level.zombie_total = GetDvarInt( "force_raps" );
321  SetDvar( "force_raps", 0 );
322  }
323  #/
324 
325  wait 1;
326 
329  PlaySoundAtPosition( "vox_zmba_event_rapsstart_0", ( 0, 0, 0 ) );
330 
331  wait 6; // wait before spawning raps
332 
333  n_raps_alive = 0;
334 
335  // Start spawning loop
336  level ‪flag::set( "raps_round_in_progress" );
337 
338  level endon( "last_ai_down" );
339 
340  level thread ‪raps_round_aftermath();
341 
342  while( true )
343  {
344  while( level.zombie_total > 0 )
345  {
346  if( ‪IS_TRUE( level.bzm_worldPaused ) )
347  {
349  continue;
350  }
351 
352  if( isdefined(level.zm_mixed_wasp_raps_spawning) )
353  {
354  [[level.zm_mixed_wasp_raps_spawning]]();
355  }
356  else
357  {
358  ‪spawn_raps();
359  }
360 
362  }
363 
365  }
366 }
367 
368 
369 function ‪spawn_raps()
370 {
371  // Spawn limiter - wait until there's space and a place to spawn a raps, and the spawning flag is set
372  while( !‪can_we_spawn_raps() )
373  {
374  wait 0.1;
375  }
376 
377  /* Find the base spawn position for the swarm */
378  s_spawn_loc = undefined;
379 
380  favorite_enemy = ‪get_favorite_enemy();
381 
382  if( !IsDefined( favorite_enemy ) )
383  {
384  ‪WAIT_ABOUT( 0.5 ); // try again after wait
385  return;
386  }
387 
388  if ( isdefined( level.raps_spawn_func ) )
389  {
390  s_spawn_loc = [[level.raps_spawn_func]]( favorite_enemy );
391  }
392  else
393  {
394  // Default method
395  s_spawn_loc = ‪calculate_spawn_position( favorite_enemy );
396  }
397 
398  if ( !isdefined( s_spawn_loc ) )
399  {
400  ‪WAIT_ABOUT( 0.5 ); // try again after wait
401  return;
402  }
403 
404  ai = ‪zombie_utility::spawn_zombie( level.raps_spawners[0] );
405  if( isdefined( ai ) )
406  {
407  ai.favoriteenemy = favorite_enemy;
408  ai.favoriteenemy.hunted_by++;
409  s_spawn_loc thread ‪raps_spawn_fx( ai, s_spawn_loc );
410  level.zombie_total--;
412  }
413 }
414 
415 
416 //*****************************************************************************
417 // Its better to tune to specific player numbers than use a scaler
418 //*****************************************************************************
419 
421 {
422  switch( level.players.size )
423  {
424  case 1:
425  n_wave_count = ‪N_NUM_RAPS_PER_ROUND_1PLAYER;
426  break;
427 
428  case 2:
429  n_wave_count = ‪N_NUM_RAPS_PER_ROUND_2PLAYER;
430  break;
431 
432  case 3:
433  n_wave_count = ‪N_NUM_RAPS_PER_ROUND_3PLAYER;
434  break;
435 
436  default:
437  case 4:
438  n_wave_count = ‪N_NUM_RAPS_PER_ROUND_4PLAYER;
439  break;
440  }
441 
442  return( n_wave_count );
443 }
444 
445 
446 //*****************************************************************************
447 //*****************************************************************************
448 
450 {
451  level endon( "restart_round" );
452  level endon( "kill_round" );
453 
454  if( level ‪flag::get("raps_round" ) )
455  {
456  level ‪flag::wait_till( "raps_round_in_progress" );
457 
458  level ‪flag::wait_till_clear( "raps_round_in_progress" );
459  }
460 
461  level.sndMusicSpecialRound = false;
462 }
463 
464 
465 //*****************************************************************************
466 // Get the number of raps alive in the level
467 //*****************************************************************************
468 
470 {
471  raps = GetEntArray( "zombie_raps", "targetname" );
472  num_alive_raps = raps.size;
473  foreach( rapsAI in raps )
474  {
475  if( !IsAlive( rapsAI ) )
476  {
477  num_alive_raps--;
478  }
479  }
480  return num_alive_raps;
481 }
482 
483 
484 //*****************************************************************************
485 //*****************************************************************************
486 
488 {
489  foreach ( player in level.players )
490  {
491  player ‪clientfield::increment_to_player( "elemental_round_fx" );
493  }
494 }
495 
496 
497 //*****************************************************************************
498 //*****************************************************************************
499 
500 function ‪show_hit_marker() // self = player
501 {
502  if ( isdefined( self ) && isdefined( self.hud_damagefeedback ) )
503  {
504  self.hud_damagefeedback SetShader( "damage_feedback", 24, 48 );
505  self.hud_damagefeedback.alpha = 1;
506  self.hud_damagefeedback FadeOverTime(1);
507  self.hud_damagefeedback.alpha = 0;
508  }
509 }
510 
511 
512 //*****************************************************************************
513 //*****************************************************************************
514 
515 function ‪rapsDamage( inflictor, attacker, ‪damage, dFlags, mod, weapon, point, dir, hitLoc, offsetTime, boneIndex, modelIndex )
516 {
517  if( isdefined(attacker) )
518  {
519  attacker ‪show_hit_marker();
520  }
521  return ‪damage;
522 }
523 
524 
525 //*********************************************************************************
526 // Check if there's space and a place to spawn a raps, and the spawning flag is set
527 //*********************************************************************************
528 
530 {
531  n_raps_alive = ‪get_current_raps_count();
532 
533  b_raps_count_at_max = n_raps_alive >= ‪N_MAX_RAPS_ALIVE;
534  b_raps_count_per_player_at_max = n_raps_alive >= level.players.size * ‪N_MAX_RAPS_PER_PLAYER;
535 
536  if( b_raps_count_at_max || b_raps_count_per_player_at_max || !( level ‪flag::get( "spawn_zombies" ) ) )
537  {
538  return false;
539  }
540  return true;
541 }
542 
543 
544 //*****************************************************************************
545 //*****************************************************************************
546 
548 {
549  switch( level.players.size )
550  {
551  case 1:
552  n_default_wait = ‪N_RAPS_SPAWN_DELAY_1P;
553  break;
554  case 2:
555  n_default_wait = ‪N_RAPS_SPAWN_DELAY_2P;
556  break;
557  case 3:
558  n_default_wait = ‪N_RAPS_SPAWN_DELAY_3P;
559  break;
560  default:
561  n_default_wait = ‪N_RAPS_SPAWN_DELAY_4P;
562  break;
563  }
564 
565  wait( n_default_wait );
566 }
567 
568 
569 //*****************************************************************************
570 //*****************************************************************************
571 
573 {
574  level waittill( "last_ai_down", e_enemy_ai );
575 
576  level thread ‪zm_audio::sndMusicSystem_PlayState( "meatball_over" );
577 
578  if( isdefined(level.zm_override_ai_aftermath_powerup_drop) )
579  {
580  [[level.zm_override_ai_aftermath_powerup_drop]]( e_enemy_ai, level.last_ai_origin );
581  }
582  else
583  {
584  power_up_origin = level.last_ai_origin;
585  ‪trace = GroundTrace(power_up_origin + (0, 0, 100), power_up_origin + (0, 0, -1000), false, undefined);
586  power_up_origin = ‪trace["position"];
587 
588  if( isdefined( power_up_origin ) )
589  {
590  level thread ‪zm_powerups::specific_powerup_drop( "full_ammo", power_up_origin );
591  }
592  }
593 
594  wait(2);
595  level.sndMusicSpecialRound = false;
596  wait(6);
597 
598  level ‪flag::clear( "raps_round_in_progress" );
599 
600  //level thread raps_round_aftermath()
601 }
602 
603 
604 //*****************************************************************************
605 // There's a single spawner and the struct is passed in as the second argument.
606 //*****************************************************************************
607 function ‪raps_spawn_fx( ai, ent )
608 {
609  ai endon( "death" );
610 
611  if ( !isdefined(ent) )
612  {
613  ent = self;
614  }
615 
616  ai ‪vehicle_ai::set_state( "scripted" );
617 
618  //find the nearest spot on the ground below the struct, since wasps and raps use the same structs and they are floating
619  ‪trace = bullettrace( ent.origin, ent.origin + (0,0,-‪N_RAPS_DROP_HEIGHT_MAX), false, ai );
620  raps_impact_location = ‪trace[ "position" ];
621 
622  // face the enemy
623  angle = VectorToAngles( ai.favoriteenemy.origin - ent.origin );
624  angles = ( ai.angles[0], angle[1], ai.angles[2] );
625 
626  ai.origin = raps_impact_location;
627  ai.angles = angles;
628  ai Hide();
629 
630  //TODO need to clientside these FX. spawning script_models is highly network unfriendly
631  //look for ceiling height
632  pos = raps_impact_location + (0 , 0, ‪N_RAPS_DROP_HEIGHT_MAX );
633  if ( !bullettracepassed( ent.origin, pos, false, ai) )
634  {
635  ‪trace = bullettrace( ent.origin, pos, false, ai );
636  pos = ‪trace["position"];
637  }
638  portal_fx_location = ‪spawn( "script_model" , pos );
639  portal_fx_location SetModel( "tag_origin" );
640  playfxontag( level._effect["raps_portal"], portal_fx_location, "tag_origin" );
641 
642  ground_tell_location = ‪spawn( "script_model" , raps_impact_location );
643  ground_tell_location SetModel( "tag_origin" );
644  playfxontag( level._effect["raps_ground_spawn"], ground_tell_location, "tag_origin" );
645  ground_tell_location playsound( "zmb_meatball_spawn_tell" );
646  playsoundatposition( "zmb_meatball_spawn_rise", pos );
647 
648  ai thread ‪cleanup_meteor_fx( portal_fx_location, ground_tell_location );
649 
650  wait 0.5;
651 
652  raps_meteor = ‪spawn( "script_model", pos);
653  model = ai.model;
654  raps_meteor SetModel( model );
655  raps_meteor.angles = angles;
656  raps_meteor playloopsound( "zmb_meatball_spawn_loop", .25 );
657 
658 
659  playfxontag( level._effect[ "raps_meteor_fire" ], raps_meteor, "tag_origin" );
660 
661  fall_dist = sqrt( DistanceSquared( pos, raps_impact_location ));
662  fall_time = fall_dist / ‪N_RAPS_DROP_SPEED; //keeps velocity constant, even for short fall distances, such as inside
663 
664  raps_meteor MoveTo(raps_impact_location, fall_time);
665 
666  raps_meteor.ai = ai;
667  raps_meteor thread ‪cleanup_meteor();
668 
669  wait(fall_time);
670  raps_meteor delete();
671 
672  if( isdefined (portal_fx_location ))
673  {
674  portal_fx_location delete();
675  }
676 
677  if ( isdefined( ground_tell_location ) )
678  {
679  ground_tell_location delete();
680  }
681 
682  ai ‪vehicle_ai::set_state( "combat" );
683 
684  //DCS 080714: this should work for an ai vehicle but currently doesn't. Support should be added soon.
685  //ai ForceTeleport( ent.origin, angles );
686  ai.origin = raps_impact_location;
687  ai.angles = angles;
688  ai Show();
689  Playfx( level._effect[ "raps_impact" ], raps_impact_location );
690  playsoundatposition( "zmb_meatball_spawn_impact", raps_impact_location );
691 
692  Earthquake( 0.3, 0.75, raps_impact_location, 512);
693 
694  assert( isdefined( ai ), "Ent isn't defined." );
695  assert( IsAlive( ai ), "Ent is dead." );
696 
698 
699  //wait( 0.1 );
700  ai SetVisibleToAll();
701  ai.ignoreme = false; // don't let attack raps give chase until the wolf is visible
702  ai notify( "visible" );
703 }
704 
706 {
707  self endon( "death" );
708 
709  self.ai waittill( "death" );
710 
711  self delete();
712 }
713 
714 function ‪cleanup_meteor_fx( portal_fx, ground_tell )
715 {
716  self waittill( "death" );
717 
718  if ( isdefined( portal_fx ) )
719  {
720  portal_fx delete();
721  }
722 
723  if ( isdefined( ground_tell ) )
724  {
725  ground_tell delete();
726  }
727 }
728 
729 //*****************************************************************************
730 //*****************************************************************************
731 
733 {
734  if( !isdefined(level.enemy_raps_global_locations) )
735  {
736  level.enemy_raps_global_locations = [];
737  keys = GetArrayKeys( level.zones );
738  for( i=0; i<keys.size; i++ )
739  {
740  zone = level.zones[keys[i]];
741 
742  // add raps_spawn locations
743  foreach( loc in zone.a_locs[ "raps_location" ] )
744  {
745  ‪ARRAY_ADD( level.enemy_raps_global_locations, loc );
746  }
747  }
748  }
749 }
750 
751 
752 //*****************************************************************************
753 //*****************************************************************************
754 
755 function ‪raps_find_closest_in_global_pool( favorite_enemy )
756 {
757  index_to_use = 0;
758  closest_distance_squared = DistanceSquared( level.enemy_raps_global_locations[index_to_use].origin, favorite_enemy.origin );
759  for( i = 0; i < level.enemy_raps_global_locations.size; i++ )
760  {
761  if( level.enemy_raps_global_locations[i].is_enabled )
762  {
763  dist_squared = DistanceSquared( level.enemy_raps_global_locations[i].origin, favorite_enemy.origin );
764  if( dist_squared<closest_distance_squared )
765  {
766  index_to_use = i;
767  closest_distance_squared = dist_squared;
768  }
769  }
770  }
771  return level.enemy_raps_global_locations[index_to_use];
772 }
773 
774 
775 //*****************************************************************************
776 // Makes use of the _zm_zone_manager to validate possible spawn locations
777 //*****************************************************************************
778 
779 function ‪calculate_spawn_position( favorite_enemy )
780 {
781  position = favorite_enemy.last_valid_position;
782  if( !IsDefined( position ) )
783  {
784  position = favorite_enemy.origin;
785  }
786 
787  // Set the min and max spawn distances based on the number of players
788  if( level.players.size == 1 )
789  {
790  N_RAPS_SPAWN_DIST_MIN = 450; // 450
791  N_RAPS_SPAWN_DIST_MAX = 900; // 900
792  }
793  else if( level.players.size == 2 )
794  {
795  N_RAPS_SPAWN_DIST_MIN = 450; // 450
796  N_RAPS_SPAWN_DIST_MAX = 850; // 850
797  }
798 
799  // With more players the meatballs can become overwhelming, so push out the spawn radius
800 
801  else if( level.players.size == 3 )
802  {
803  N_RAPS_SPAWN_DIST_MIN = 700; // 500
804  N_RAPS_SPAWN_DIST_MAX = 1000; // 900
805  }
806  else
807  {
808  N_RAPS_SPAWN_DIST_MIN = 800; // 550
809  N_RAPS_SPAWN_DIST_MAX = 1200; // 1000
810  }
811 
812  // Get a spawn location on the navigation mesh
813  query_result = PositionQuery_Source_Navigation(
814  position, // origin
815  N_RAPS_SPAWN_DIST_MIN, // min radius
816  N_RAPS_SPAWN_DIST_MAX, // max radius
817  200, // half height
818  32, // inner spacing
819  16 // radius from edges
820  );
821 
822  if ( query_result.data.size )
823  {
824  a_s_locs = array::randomize( query_result.data );
825 
826  if ( isdefined( a_s_locs ) )
827  {
828  foreach( s_loc in a_s_locs )
829  {
830  if ( ‪zm_utility::check_point_in_enabled_zone( s_loc.origin, true, level.active_zones ) )
831  {
832  s_loc.origin += (0,0,16); // Add some allowance so it is above ground, otherwise it may spawn and get shoved below the ground.
833  return s_loc;
834  }
835  }
836  }
837  }
838 
839  return undefined;
840 }
841 
842 
843 //*****************************************************************************
844 //*****************************************************************************
845 
847 {
848  raps_targets = GetPlayers();
849  e_least_hunted = undefined;
850 
851  for( i=0; i<raps_targets.size; i++ )
852  {
853  ‪e_target = raps_targets[i];
854 
855  // Initialize .hunted_by?
856  if( !isdefined( ‪e_target.hunted_by ) )
857  {
858  ‪e_target.hunted_by = 0;
859  }
860 
861  // Make sure the player is a valid target
863  {
864  continue;
865  }
866 
867  //
868  if( IsDefined( level.is_player_accessible_to_raps ) && ![[level.is_player_accessible_to_raps]]( ‪e_target ) )
869  {
870  continue;
871  }
872 
873  // Does this target have less things targetting it?
874  if( !isdefined(e_least_hunted) )
875  {
876  e_least_hunted = ‪e_target;
877  }
878  else if( ‪e_target.hunted_by < e_least_hunted.hunted_by )
879  {
880  e_least_hunted = ‪e_target;
881  }
882  }
883 
884  return e_least_hunted;
885 }
886 
887 
888 //*****************************************************************************
889 //*****************************************************************************
890 
892 {
893  players = GetPlayers();
894 
895  level.n_raps_health = level.round_number * ‪N_RAPS_HEALTH_INCREASE;
896 
897  if( level.n_raps_health > ‪N_RAPS_HEALTH_MAX )
898  {
899  level.n_raps_health = ‪N_RAPS_HEALTH_MAX;
900  }
901 }
902 
903 
904 //*****************************************************************************
905 //*****************************************************************************
906 
908 {
909  self playlocalsound( "zmb_raps_round_start" );
910  variation_count =5;
911 
912  wait(4.5);
913 
914  players = GetPlayers();
915  num = RandomIntRange(0,players.size);
916  players[num] ‪zm_audio::create_and_play_dialog( "general", "raps_spawn" );
917 }
918 
919 
920 //*****************************************************************************
921 //*****************************************************************************
922 
923 function ‪raps_init()
924 {
925  self.inpain = true;
926  thread ‪raps::raps_initialize();
927  self.inpain = false;
928 
929  self.targetname = "zombie_raps";
930  self.script_noteworthy = undefined;
931  self.animname = "zombie_raps";
932  self.ignoreme = true; // don't let attack raps give chase until the wolf is visible
933  self.allowdeath = true; // allows death during animscripted calls
934  self.allowpain = false;
935  self.no_gib = true; //gibbing disabled
936  self.is_zombie = true; // needed for melee.gsc in the animscripts
937  // out both legs and then the only allowed stance should be prone.
938  self.gibbed = false;
939  self.head_gibbed = false;
940  self.default_goalheight = 40;
941  self.ignore_inert = true;
942  self.no_eye_glow = true;
943 
944  self.lightning_chain_immune = true;
945 
946  self.holdfire = true;
947 
948  // self.disableArrivals = true;
949  // self.disableExits = true;
950  self.grenadeawareness = 0;
951  self.badplaceawareness = 0;
952 
953  self.ignoreSuppression = true;
954  self.suppressionThreshold = 1;
955  self.noDodgeMove = true;
956  self.dontShootWhileMoving = true;
957  self.pathenemylookahead = 0;
958  self.test_failed_path = true; // make raps explode if can't find path
959 
960  self.badplaceawareness = 0;
961  self.chatInitialized = false;
962  self.missingLegs = false;
963  self.isdog = false;
964  self.teslafxtag = "tag_origin";
965 
966  self.custom_player_shellshock = &‪raps_custom_player_shellshock;
967 
968  self.grapple_type = ‪GRAPPLE_TYPE_PULLENTIN;
969  self SetGrapplableType( self.grapple_type );
970 
971  self.team = level.zombie_team;
972  self.sword_kill_power = ‪ZM_RAPS_SWORD_KILL_POWER;
973 
974  health_multiplier = 1.0;
975  if ( GetDvarString( "scr_raps_health_walk_multiplier" ) != "" )
976  {
977  health_multiplier = GetDvarFloat( "scr_raps_health_walk_multiplier" );
978  }
979 
980  self.maxhealth = int( level.n_raps_health * health_multiplier );
981  if( isdefined(level.a_zombie_respawn_health[ self.archetype ] ) && level.a_zombie_respawn_health[ self.archetype ].size > 0 )
982  {
983  self.health = level.a_zombie_respawn_health[ self.archetype ][0];
984  ArrayRemoveValue(level.a_zombie_respawn_health[ self.archetype ], level.a_zombie_respawn_health[ self.archetype ][0]);
985  }
986  else
987  {
988  self.health = int( level.n_raps_health * health_multiplier );
989  }
990 
991  self thread ‪raps_run_think();
992 
993  self SetInvisibleToAll();
994 
995  self thread ‪raps_death();
996  self thread ‪raps_timeout_after_xsec( 90.0 );
997 
998  level thread ‪zm_spawner::zombie_death_event( self );
1000 
1001  self ‪zm_spawner::zombie_history( "zombie_raps_spawn_init -> Spawned = " + self.origin );
1002 
1003  if ( isdefined(level.achievement_monitor_func) )
1004  {
1005  self [[level.achievement_monitor_func]]();
1006  }
1007 }
1008 
1009 
1010 //*****************************************************************************
1011 //*****************************************************************************
1012 
1014 {
1015  self endon( "death" );
1016  wait( ‪timeout );
1017  self DoDamage( self.health + 100, self.origin, self, undefined, "none", "MOD_UNKNOWN" );
1018 }
1019 
1020 
1021 //*****************************************************************************
1022 //*****************************************************************************
1023 
1024 function ‪raps_death()
1025 {
1026  self waittill( "death", attacker );
1027 
1028  if( ‪get_current_raps_count() == 0 && level.zombie_total == 0 )
1029  {
1030  // Can be overridded for mixed AI rounds, in this case the last AI may be a wasp ro raps etc...
1031  if( ( !isdefined(level.zm_ai_round_over) || [[level.zm_ai_round_over]]() ) )
1032  {
1033  level.last_ai_origin = self.origin;
1034  level notify( "last_ai_down", self );
1035  }
1036  }
1037 
1038  // rewards
1039  if( IsPlayer( attacker ) )
1040  {
1041  // score
1042  if( !‪IS_TRUE( self.deathpoints_already_given ) )
1043  {
1044  attacker ‪zm_score::player_add_points( "death_raps", ‪N_RAPS_KILL_POINTS ); // points awarded
1045  }
1046 
1047  // bonus weapon power
1048  if( isdefined(level.hero_power_update))
1049  {
1050  [[level.hero_power_update]](attacker, self);
1051  }
1052 
1053  // dialog responses to kill
1054  if( RandomIntRange(0,100) >= 80 )
1055  {
1056  attacker ‪zm_audio::create_and_play_dialog( "kill", "hellhound" );
1057  }
1058 
1059  //stats
1060  attacker ‪zm_stats::increment_client_stat( "zraps_killed" );
1061  attacker ‪zm_stats::increment_player_stat( "zraps_killed" );
1062 
1063  }
1064 
1065  // switch to inflictor when SP DoDamage supports it
1066  if( isdefined( attacker ) && isai( attacker ) )
1067  {
1068  attacker notify( "killed", self );
1069  }
1070 
1071  if ( isdefined( self ) )
1072  {
1073  // sound
1074  self stoploopsound();
1075 
1076  self thread ‪raps_explode_fx( self.origin );
1077  }
1078 }
1079 
1080 
1081 //*****************************************************************************
1082 //*****************************************************************************
1083 
1084 function ‪raps_custom_player_shellshock( ‪damage, attacker, direction_vec, point, mod )
1085 {
1086  if( mod == "MOD_EXPLOSIVE" )
1087  {
1089  }
1090 }
1091 
1092 
1093 //*****************************************************************************
1094 //*****************************************************************************
1095 
1096 #define N_RAPS_SHELLSHOCK_HIT_LIMIT 4
1097 
1099 {
1100  self endon("death");
1101  ‪DEFAULT(self.raps_recent_explosions, 0);
1102  self.raps_recent_explosions++;
1103  if ( self.raps_recent_explosions >= ‪N_RAPS_SHELLSHOCK_HIT_LIMIT )
1104  {
1105  self ShellShock( "explosion_elementals", 2.0 );
1106  }
1107  self ‪util::waittill_any_timeout( 20, "death" );
1108  self.raps_recent_explosions--;
1109 }
1110 
1111 
1112 //*****************************************************************************
1113 //*****************************************************************************
1114 
1115 function ‪raps_explode_fx( origin )
1116 {
1117  PlayFX( level._effect["raps_gib"], origin );
1118 }
1119 
1120 
1121 //*****************************************************************************
1122 // this is where zombies go into attack mode, and need different attributes set up
1123 //*****************************************************************************
1124 
1126 {
1127  self ‪zm_spawner::zombie_history( "zombie_setup_attack_properties()" );
1128 
1129  // allows zombie to attack again
1130  self.ignoreall = false;
1131 
1132  //self.pathEnemyFightDist = 64;
1133  self.meleeAttackDist = 64;
1134 
1135  // turn off transition anims
1136  self.disableArrivals = true;
1137  self.disableExits = true;
1138 
1139 }
1140 
1141 
1142 //*****************************************************************************
1143 //*****************************************************************************
1144 //COLLIN'S Audio Scripts
1145 
1147 {
1148  self waittill("death");
1149  self stopsounds();
1150 }
1151 
1152 
1153 //*****************************************************************************
1154 // Allows raps to be spawned independent of the round spawning
1155 //*****************************************************************************
1156 
1157 function ‪special_raps_spawn( n_to_spawn = 1, s_spawn_loc, fn_on_spawned )
1158 {
1159  raps = GetEntArray( "zombie_raps", "targetname" );
1160 
1161  if ( isdefined( raps ) && raps.size >= 9 )
1162  {
1163  return false;
1164  }
1165 
1166  count = 0;
1167  while ( count < n_to_spawn )
1168  {
1169  //update the player array.
1170  players = GetPlayers();
1171  favorite_enemy = ‪get_favorite_enemy();
1172 
1173  if( !IsDefined( favorite_enemy ) )
1174  {
1175  ‪WAIT_ABOUT( 1 ); // try again after wait
1176  continue;
1177  }
1178 
1179  if ( isdefined( level.raps_spawn_func ) )
1180  {
1181  s_spawn_loc = [[level.raps_spawn_func]]( favorite_enemy );
1182  }
1183  else
1184  {
1185  // Default method
1186  s_spawn_loc = ‪calculate_spawn_position( favorite_enemy );
1187  }
1188 
1189  if ( !isdefined( s_spawn_loc ) )
1190  {
1191  ‪WAIT_ABOUT( 1 ); // try again after wait
1192  continue;
1193  }
1194 
1195  ai = ‪zombie_utility::spawn_zombie( level.raps_spawners[0] );
1196  if( isdefined( ai ) )
1197  {
1198  ai.favoriteenemy = favorite_enemy;
1199  ai.favoriteenemy.hunted_by++;
1200  s_spawn_loc thread ‪raps_spawn_fx( ai, s_spawn_loc );
1201  count++;
1202 
1203  if ( isdefined( fn_on_spawned ) )
1204  {
1205  ai thread [[fn_on_spawned]]();
1206  }
1207  }
1208 
1210  }
1211 
1212  return true;
1213 }
1214 
1215 
1216 //*****************************************************************************
1217 //*****************************************************************************
1218 
1220 {
1221  self endon( "death" );
1222 
1223  self waittill( "visible" );
1224 
1225  // decrease health
1226  if ( self.health > level.n_raps_health )
1227  {
1228  self.maxhealth = level.n_raps_health;
1229  self.health = level.n_raps_health;
1230  }
1231 
1232  //Check to see if the enemy is not valid anymore
1233  while( 1 )
1234  {
1235  if( ( !‪zm_utility::is_player_valid(self.favoriteenemy) && self.b_attracted_to_octobomb !== true ) || self ‪should_raps_giveup_inaccessible_player( self.favoriteenemy ) )
1236  {
1237  //We are targetting an invalid player - select another one
1238  potential_target = ‪get_favorite_enemy();
1239  if( IsDefined( potential_target ) )
1240  {
1241  self.favoriteenemy = potential_target;
1242  self.favoriteenemy.hunted_by++;
1243  self.raps_force_patrol_behavior = undefined;
1244  }
1245  else
1246  {
1247  self.raps_force_patrol_behavior = true;
1248  }
1249  }
1250  wait( 0.1 );
1251  }
1252 }
1253 
1254 
1255 //*****************************************************************************
1256 //*****************************************************************************
1257 
1259 {
1260  if( IsDefined( level.raps_can_reach_inaccessible_location ) && self [[level.raps_can_reach_inaccessible_location]]() )
1261  {
1262  return false;
1263  }
1264  if( IsDefined( level.is_player_accessible_to_raps ) && ![[level.is_player_accessible_to_raps]]( player ) )
1265  {
1266  return true;
1267  }
1268  return false;
1269 }
1270 
1271 
1272 //*****************************************************************************
1273 //*****************************************************************************
1274 
1276 {
1277  self endon( "death" );
1278 
1279  while(1)
1280  {
1281  self playsound( "zmb_hellhound_vocals_amb" );
1282  wait randomfloatrange(3,6);
1283  }
1284 }
1285 
1286 
1287 //*****************************************************************************
1288 //*****************************************************************************
1289 
1291 {
1292  self endon( "death" );
1293 
1294  ‪damage = int( self.maxhealth * 0.5 );
1295  self DoDamage( ‪damage, player.origin, player, undefined, "none", "MOD_UNKNOWN" );
1296 }
1297 
‪timeout
‪function timeout(n_time, func, arg1, arg2, arg3, arg4, arg5, arg6)
Definition: util_shared.csc:762
‪get_current_raps_count
‪function get_current_raps_count()
Definition: _zm_ai_raps.gsc:469
‪activate
‪function activate()
Definition: traps_shared.gsc:655
‪N_RAPS_DROP_SPEED
‪#define N_RAPS_DROP_SPEED
Definition: _zm_ai_raps.gsc:56
‪set_state
‪function set_state(name, state_params)
Definition: statemachine_shared.gsc:133
‪should_raps_giveup_inaccessible_player
‪function should_raps_giveup_inaccessible_player(player)
Definition: _zm_ai_raps.gsc:1258
‪e_target
‪var e_target
Definition: traps_shared.gsc:2029
‪increment_client_stat
‪function increment_client_stat(stat_name, include_gametype)
Definition: _zm_stats.gsc:389
‪create_global_raps_spawn_locations_list
‪function create_global_raps_spawn_locations_list()
Definition: _zm_ai_raps.gsc:732
‪raps_round_stop
‪function raps_round_stop()
Definition: _zm_ai_raps.gsc:259
‪raps_round_aftermath
‪function raps_round_aftermath()
Definition: _zm_ai_raps.gsc:572
‪raps_find_closest_in_global_pool
‪function raps_find_closest_in_global_pool(favorite_enemy)
Definition: _zm_ai_raps.gsc:755
‪player_watch_shellshock_accumulation
‪function player_watch_shellshock_accumulation()
Definition: _zm_ai_raps.gsc:1098
‪stop_raps_sound_on_death
‪function stop_raps_sound_on_death()
Definition: _zm_ai_raps.gsc:1146
‪play_raps_round
‪function play_raps_round()
Definition: _zm_ai_raps.gsc:907
‪increment_player_stat
‪function increment_player_stat(stat_name)
Definition: _zm_stats.gsc:369
‪player_add_points
‪function player_add_points(event, mod, hit_location, is_dog, zombie_team, damage_weapon)
Definition: _zm_score.gsc:129
‪specific_powerup_drop
‪function specific_powerup_drop(powerup_name, drop_spot, powerup_team, powerup_location, pickup_delay, powerup_player, b_stay_forever)
Definition: _zm_powerups.gsc:688
‪get_raps_spawn_total
‪function get_raps_spawn_total()
Definition: _zm_ai_raps.gsc:420
‪clear
‪function clear(str_flag)
Definition: flag_shared.csc:130
‪spawn_raps
‪function spawn_raps()
Definition: _zm_ai_raps.gsc:369
‪raps_explode_fx
‪function raps_explode_fx(origin)
Definition: _zm_ai_raps.gsc:1115
‪raps_timeout_after_xsec
‪function raps_timeout_after_xsec(timeout)
Definition: _zm_ai_raps.gsc:1013
‪cleanup_meteor
‪function cleanup_meteor()
Definition: _zm_ai_raps.gsc:705
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪special_raps_spawn
‪function special_raps_spawn(n_to_spawn=1, s_spawn_loc, fn_on_spawned)
Definition: _zm_ai_raps.gsc:1157
‪ELEMENTAL_ROUND_RING_FX
‪#define ELEMENTAL_ROUND_RING_FX
Definition: _zm_ai_raps.gsh:9
‪raps_round_start
‪function raps_round_start()
Definition: _zm_ai_raps.gsc:232
‪raps_custom_player_shellshock
‪function raps_custom_player_shellshock(damage, attacker, direction_vec, point, mod)
Definition: _zm_ai_raps.gsc:1084
‪raps_init
‪function raps_init()
Definition: _zm_ai_raps.gsc:923
‪raps_stalk_audio
‪function raps_stalk_audio()
Definition: _zm_ai_raps.gsc:1275
‪trace
‪function trace(from, to, target)
Definition: grapple.gsc:369
‪spawn
‪function spawn(v_origin=(0, 0, 0), v_angles=(0, 0, 0))
Definition: struct.csc:23
‪N_MAX_RAPS_ALIVE
‪#define N_MAX_RAPS_ALIVE
Definition: _zm_ai_raps.gsh:13
‪waittill_any_timeout
‪function waittill_any_timeout(n_timeout, string1, string2, string3, string4, string5)
Definition: util_shared.csc:423
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪ZM_ELEMENTAL_RING_LOOP_DURATION
‪#define ZM_ELEMENTAL_RING_LOOP_DURATION
Definition: _zm_ai_raps.gsh:7
‪check_point_in_enabled_zone
‪function check_point_in_enabled_zone(origin, zone_is_active, player_zones)
Definition: _zm_utility.gsc:512
‪N_RAPS_KILL_POINTS
‪#define N_RAPS_KILL_POINTS
Definition: _zm_ai_raps.gsc:53
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪raps_round_wait_func
‪function raps_round_wait_func()
Definition: _zm_ai_raps.gsc:449
‪raps_initialize
‪function raps_initialize()
Definition: _raps.gsc:43
‪gib
‪function gib(attacker)
Definition: _amws.gsc:1072
‪register_immunity
‪function register_immunity(name, archetype, immune_trigger, immune_result_direct, immune_result_indirect)
Definition: aat_shared.gsc:305
‪cleanup_meteor_fx
‪function cleanup_meteor_fx(portal_fx, ground_tell)
Definition: _zm_ai_raps.gsc:714
‪is_player_valid
‪function is_player_valid(player, checkIgnoreMeFlag, ignore_laststand_players)
Definition: skeleton.gsc:256
‪get_favorite_enemy
‪function get_favorite_enemy()
Definition: _zm_ai_raps.gsc:846
‪damage
‪function damage(trap)
Definition: _zm_trap_electric.gsc:116
‪can_we_spawn_raps
‪function can_we_spawn_raps()
Definition: _zm_ai_raps.gsc:529
‪N_RAPS_HEALTH_INCREASE
‪#define N_RAPS_HEALTH_INCREASE
Definition: _zm_ai_raps.gsc:51
‪init
‪function init()
Definition: _zm_ai_raps.gsc:70
‪N_RAPS_SPAWN_DELAY_1P
‪#define N_RAPS_SPAWN_DELAY_1P
Definition: _zm_ai_raps.gsc:58
‪DEFAULT
‪#define DEFAULT(__var, __default)
Definition: shared.gsh:270
‪N_NUM_RAPS_PER_ROUND_4PLAYER
‪#define N_NUM_RAPS_PER_ROUND_4PLAYER
Definition: _zm_ai_raps.gsc:49
‪ZM_RAPS_SWORD_KILL_POWER
‪#define ZM_RAPS_SWORD_KILL_POWER
Definition: _zm_ai_raps.gsh:3
‪wait_network_frame
‪function wait_network_frame(n_count=1)
Definition: util_shared.gsc:64
‪sndMusicSystem_PlayState
‪function sndMusicSystem_PlayState(state)
Definition: _zm_audio.gsc:1042
‪raps_round_spawning
‪function raps_round_spawning()
Definition: _zm_ai_raps.gsc:281
‪N_NUM_RAPS_PER_ROUND_1PLAYER
‪#define N_NUM_RAPS_PER_ROUND_1PLAYER
Definition: _zm_ai_raps.gsc:46
‪N_MAX_RAPS_PER_PLAYER
‪#define N_MAX_RAPS_PER_PLAYER
Definition: _zm_ai_raps.gsh:14
‪enable_raps_rounds
‪function enable_raps_rounds()
Definition: _zm_ai_raps.gsc:117
‪rapsDamage
‪function rapsDamage(inflictor, attacker, damage, dFlags, mod, weapon, point, dir, hitLoc, offsetTime, boneIndex, modelIndex)
Definition: _zm_ai_raps.gsc:515
‪zombie_setup_attack_properties_raps
‪function zombie_setup_attack_properties_raps()
Definition: _zm_ai_raps.gsc:1125
‪zombie_history
‪function zombie_history(msg)
Definition: _zm_spawner.gsc:2863
‪increment_to_player
‪function increment_to_player(str_field_name, n_increment_count=1)
Definition: clientfield_shared.gsc:169
‪ARRAY_ADD
‪#define ARRAY_ADD(__array, __item)
Definition: shared.gsh:304
‪N_NUM_RAPS_PER_ROUND_3PLAYER
‪#define N_NUM_RAPS_PER_ROUND_3PLAYER
Definition: _zm_ai_raps.gsc:48
‪ZM_ELEMENTAL_ROUND_VISIONSET
‪#define ZM_ELEMENTAL_ROUND_VISIONSET
Definition: _zm_ai_raps.gsh:4
‪raps_spawn_fx
‪function raps_spawn_fx(ai, ent)
Definition: _zm_ai_raps.gsc:607
‪ARCHETYPE_RAPS
‪#define ARCHETYPE_RAPS
Definition: archetype_shared.gsh:33
‪ZM_AAT_DEAD_WIRE_NAME
‪#define ZM_AAT_DEAD_WIRE_NAME
Definition: aat_zm.gsh:5
‪wait_till
‪function wait_till(str_flag)
Definition: flag_shared.csc:189
‪N_NUM_RAPS_PER_ROUND_2PLAYER
‪#define N_NUM_RAPS_PER_ROUND_2PLAYER
Definition: _zm_ai_raps.gsc:47
‪raps_health_increase
‪function raps_health_increase()
Definition: _zm_ai_raps.gsc:891
‪ZM_AAT_TURNED_NAME
‪#define ZM_AAT_TURNED_NAME
Definition: aat_zm.gsh:8
‪enemy_death_detection
‪function enemy_death_detection()
Definition: _zm_spawner.gsc:134
‪spawn_zombie
‪function spawn_zombie(spawner, target_name, spawn_point, round_number)
Definition: zombie_utility.gsc:1454
‪waiting_for_next_raps_spawn
‪function waiting_for_next_raps_spawn()
Definition: _zm_ai_raps.gsc:547
‪register_info
‪function register_info(type, name, version, lerp_step_count)
Definition: visionset_mgr_shared.csc:334
‪zombie_death_event
‪function zombie_death_event(zombie)
Definition: _zm_spawner.gsc:2195
‪N_RAPS_DROP_HEIGHT_MAX
‪#define N_RAPS_DROP_HEIGHT_MAX
Definition: _zm_ai_raps.gsc:55
‪WAIT_ABOUT
‪#define WAIT_ABOUT(__time)
Definition: shared.gsh:436
‪N_RAPS_SPAWN_DELAY_2P
‪#define N_RAPS_SPAWN_DELAY_2P
Definition: _zm_ai_raps.gsc:59
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪ramp_in_out_thread
‪function ramp_in_out_thread(ramp_in, full_period, ramp_out)
Definition: visionset_mgr_shared.gsc:266
‪raps_thundergun_knockdown
‪function raps_thundergun_knockdown(player, gib)
Definition: _zm_ai_raps.gsc:1290
‪show_hit_marker
‪function show_hit_marker()
Definition: _zm_ai_raps.gsc:500
‪raps_spawner_init
‪function raps_spawner_init()
Definition: _zm_ai_raps.gsc:134
‪ZM_ELEMENTAL_VISION_LERP_COUNT
‪#define ZM_ELEMENTAL_VISION_LERP_COUNT
Definition: _zm_ai_raps.gsh:2
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪ZM_ELEMENTAL_VISION_OVERLAY_PRIORITY
‪#define ZM_ELEMENTAL_VISION_OVERLAY_PRIORITY
Definition: _zm_ai_raps.gsh:1
‪raps_death
‪function raps_death()
Definition: _zm_ai_raps.gsc:1024
‪N_RAPS_SPAWN_DELAY_3P
‪#define N_RAPS_SPAWN_DELAY_3P
Definition: _zm_ai_raps.gsc:60
‪create_and_play_dialog
‪function create_and_play_dialog(category, subcategory, force_variant)
Definition: _zm_audio.gsc:603
‪is_spawner_targeted_by_blocker
‪function is_spawner_targeted_by_blocker(ent)
Definition: _zm_spawner.gsc:164
‪ZM_AAT_BLAST_FURNACE_NAME
‪#define ZM_AAT_BLAST_FURNACE_NAME
Definition: aat_zm.gsh:4
‪GRAPPLE_TYPE_PULLENTIN
‪#define GRAPPLE_TYPE_PULLENTIN
Definition: grapple.gsh:6
‪raps_round_tracker
‪function raps_round_tracker()
Definition: _zm_ai_raps.gsc:169
‪N_RAPS_HEALTH_MAX
‪#define N_RAPS_HEALTH_MAX
Definition: _zm_ai_raps.gsc:52
‪wait_till_clear
‪function wait_till_clear(str_flag)
Definition: flag_shared.csc:248
‪raps_run_think
‪function raps_run_think()
Definition: _zm_ai_raps.gsc:1219
‪ZM_ELEMENTAL_RING_EXIT_DURATION
‪#define ZM_ELEMENTAL_RING_EXIT_DURATION
Definition: _zm_ai_raps.gsh:8
‪ZM_AAT_THUNDER_WALL_NAME
‪#define ZM_AAT_THUNDER_WALL_NAME
Definition: aat_zm.gsh:7
‪ZM_AAT_FIRE_WORKS_NAME
‪#define ZM_AAT_FIRE_WORKS_NAME
Definition: aat_zm.gsh:6
‪ZM_ELEMENTAL_RING_ENTER_DURATION
‪#define ZM_ELEMENTAL_RING_ENTER_DURATION
Definition: _zm_ai_raps.gsh:6
‪N_RAPS_SPAWN_DELAY_4P
‪#define N_RAPS_SPAWN_DELAY_4P
Definition: _zm_ai_raps.gsc:61
‪N_RAPS_SHELLSHOCK_HIT_LIMIT
‪#define N_RAPS_SHELLSHOCK_HIT_LIMIT
Definition: _zm_ai_raps.gsc:1096
‪elemental_round_fx
‪function elemental_round_fx()
Definition: _zm_ai_raps.gsc:487
‪calculate_spawn_position
‪function calculate_spawn_position(favorite_enemy)
Definition: _zm_ai_raps.gsc:779