‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_zm_audio.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\array_shared;
4 #using scripts\shared\callbacks_shared;
5 #using scripts\shared\clientfield_shared;
6 #using scripts\shared\flag_shared;
7 #using scripts\shared\laststand_shared;
8 #using scripts\shared\music_shared;
9 #using scripts\shared\system_shared;
10 #using scripts\shared\util_shared;
11 
12 #insert scripts\shared\shared.gsh;
13 #insert scripts\shared\version.gsh;
14 #insert scripts\zm\_zm_audio.gsh;
15 
16 #using scripts\shared\ai\zombie_utility;
17 
18 #using scripts\zm\_zm_laststand;
19 #using scripts\zm\_zm_spawner;
20 #using scripts\zm\_zm_utility;
21 #using scripts\zm\_zm_zonemgr;
22 
23 #namespace zm_audio;
24 
25 ‪REGISTER_SYSTEM( "zm_audio", &‪__init__, undefined )
26 
27 function ‪__init__()
28 {
29  ‪clientfield::register( "allplayers", "charindex", ‪VERSION_SHIP, 3, "int" );
30  ‪clientfield::register( "toplayer", "isspeaking",‪VERSION_SHIP, 1, "int" );
31 
32 
33  level.audio_get_mod_type = &‪get_mod_type;
34  level ‪zmbVox();
36 
37  level thread ‪sndAnnouncer_Init();
38 }
39 
40 function ‪SetExertVoice( exert_id )
41 {
42  self.player_exert_id = exert_id;
43  self ‪clientfield::set( "charindex", self.player_exert_id );
44 
45 }
46 
47 function ‪playerExert( exert, notifywait = false )
48 {
49  if(‪IS_TRUE(self.isSpeaking) || ‪IS_TRUE(self.isexerting) )
50  {
51  return;
52  }
53 
54  if( ‪IS_TRUE( self.beastmode ) )
55  return;
56 
57  id = level.exert_sounds[0][exert];
58  if( isDefined(self.player_exert_id) )
59  {
60  if (!isdefined(level.exert_sounds) || !isdefined(level.exert_sounds[self.player_exert_id]) || !isdefined(level.exert_sounds[self.player_exert_id][exert]))
61  return;
62  if(IsArray(level.exert_sounds[self.player_exert_id][exert]))
63  {
64  id = array::random(level.exert_sounds[self.player_exert_id][exert]);
65  }
66  else
67  {
68  id = level.exert_sounds[self.player_exert_id][exert];
69  }
70  }
71 
72  if (isdefined(id))
73  {
74  self.isexerting = true;
75 
76  if (notifywait)
77  {
78  self playsoundwithnotify(id, "done_exerting" );
79  self waittill( "done_exerting" );
80  self.isexerting = false;
81  }
82  else
83  {
84  self thread ‪exert_timer();
85  self playsound (id);
86  }
87  }
88 }
89 
90 function ‪exert_timer()
91 {
92  self endon("disconnect");
93  //wait(1);
94  //self.isexerting = true;
95  wait( randomfloatrange (1.5,3));
96  self.isexerting = false;
97 
98 }
99 
100 
101 
102 //All Vox should be found in this section.
103 //If there is an Alias that needs to be changed, check here first.
104 function ‪zmbVox()
105 {
106  level.votimer = [];
107 
108  level.vox = ‪zmbVoxCreate();
109 
110  //Init Level Specific Vox
111  if( isdefined( level._zmbVoxLevelSpecific ) )
112  level thread [[level._zmbVoxLevelSpecific]]();
113 
114  //Init Gametype Specific Vox
115  if( isdefined( level._zmbVoxGametypeSpecific ) )
116  level thread [[level._zmbVoxGametypeSpecific]]();
117 
118  announcer_ent = ‪spawn( "script_origin", (0,0,0) );
119  level.vox ‪zmbVoxInitSpeaker( "announcer", "vox_zmba_", announcer_ent );
120 
121  // sniper hold breath
122  level.exert_sounds[0]["burp"] = "evt_belch";
123 
124  // medium hit
125  level.exert_sounds[0]["hitmed"] = "null";
126 
127  // large hit
128  level.exert_sounds[0]["hitlrg"] = "null";
129 
130  // custom character exerts
131  if (isdefined(level.setupCustomCharacterExerts))
132  [[level.setupCustomCharacterExerts]]();
133 }
134 
136 {
137  self thread ‪zombie_behind_vox();
138  self thread ‪player_killstreak_timer();
139 
140  if(isdefined(level._custom_zombie_oh_shit_vox_func))
141  {
142  self thread [[level._custom_zombie_oh_shit_vox_func]]();
143  }
144  else
145  {
146  self thread ‪oh_shit_vox();
147  }
148 }
149 
150 //Plays a specific Zombie vocal when they are close behind the player
151 //Self is the Player(s)
153 {
154  level endon("unloaded");
155  self endon("death_or_disconnect");
156 
157  if(!IsDefined(level._zbv_vox_last_update_time))
158  {
159  level._zbv_vox_last_update_time = 0;
160  level._audio_zbv_shared_ent_list = ‪zombie_utility::get_zombie_array();
161  }
162 
163  while(1)
164  {
165  wait(1);
166 
167  t = GetTime();
168 
169  if(t > level._zbv_vox_last_update_time + 1000)
170  {
171  level._zbv_vox_last_update_time = t;
172  level._audio_zbv_shared_ent_list = ‪zombie_utility::get_zombie_array();
173  }
174 
175  zombs = level._audio_zbv_shared_ent_list;
176 
177  played_sound = false;
178 
179  for(i=0;i<zombs.size;i++)
180  {
181  if(!isDefined(zombs[i]))
182  {
183  continue;
184  }
185 
186  if(zombs[i].isdog)
187  {
188  continue;
189  }
190 
191  dist = 150;
192  z_dist = 50;
193  alias = level.vox_behind_zombie;
194 
195  if(IsDefined(zombs[i].zombie_move_speed))
196  {
197  switch(zombs[i].zombie_move_speed)
198  {
199  case "walk": dist = 150;break;
200  case "run": dist = 175;break;
201  case "sprint": dist = 200;break;
202  }
203  }
204  if(DistanceSquared(zombs[i].origin,self.origin) < dist * dist )
205  {
206  yaw = self ‪zm_utility::GetYawToSpot(zombs[i].origin );
207  z_diff = self.origin[2] - zombs[i].origin[2];
208  if( (yaw < -95 || yaw > 95) && abs( z_diff ) < 50 )
209  {
210  zombs[i] notify( "bhtn_action_notify", "behind" );
211  played_sound = true;
212  break;
213  }
214  }
215  }
216 
217  if(played_sound)
218  {
219  wait(3.5); // Each player can only play one instance of this sound every 5 seconds - instead of the previous network storm.
220  }
221  }
222 }
223 
224 function ‪oh_shit_vox()
225 {
226  self endon("death_or_disconnect");
227 
228  while(1)
229  {
230  wait(1);
231 
232  players = GetPlayers();
234 
235  if( players.size >= 1 )
236  {
237  close_zombs = 0;
238  for( i=0; i<zombs.size; i++ )
239  {
240  if( (isDefined(zombs[i].favoriteenemy) && zombs[i].favoriteenemy == self) || !isDefined(zombs[i].favoriteenemy) )
241  {
242  if( DistanceSquared( zombs[i].origin, self.origin ) < 250 * 250)
243  {
244  close_zombs ++;
245  }
246  }
247  }
248  if( close_zombs > 4 )
249  {
250  self ‪zm_audio::create_and_play_dialog( "general", "oh_shit" );
251  wait(4);
252  }
253  }
254  }
255 }
256 
257 //** Player Killstreaks: The following functions start a timer on each player whenever they begin killing zombies.
258 //** If they kill a certain amount of zombies within a certain time, they will get a Killstreak line
260 {
261  self endon("disconnect");
262  self endon("death");
263 
264  if(GetDvarString ("zombie_kills") == "")
265  {
266  SetDvar ("zombie_kills", "7");
267  }
268  if(GetDvarString ("zombie_kill_timer") == "")
269  {
270  SetDvar ("zombie_kill_timer", "5");
271  }
272 
273  kills = GetDvarInt( "zombie_kills");
274  time = GetDvarInt( "zombie_kill_timer");
275 
276  if (!isdefined (self.timerIsrunning))
277  {
278  self.timerIsrunning = 0;
279  self.killcounter = 0;
280  }
281 
282  while(1)
283  {
284  self waittill( "zom_kill", zomb );
285 
286  if( IsDefined( zomb._black_hole_bomb_collapse_death ) && zomb._black_hole_bomb_collapse_death == 1 )
287  {
288  continue;
289  }
290 
291  if( ‪IS_TRUE( zomb.microwavegun_death ) )
292  {
293  continue;
294  }
295 
296  self.killcounter ++;
297 
298  if (self.timerIsrunning != 1)
299  {
300  self.timerIsrunning = 1;
301  self thread ‪timer_actual(kills, time);
302  }
303  }
304 }
305 
306 function ‪player_zombie_kill_vox( hit_location, player, mod, zombie )
307 {
308  weapon = player GetCurrentWeapon();
309  dist = DistanceSquared( player.origin, zombie.origin );
310 
311  if( !isdefined(level.zombie_vars[player.team]["zombie_insta_kill"] ) )
312  level.zombie_vars[player.team]["zombie_insta_kill"] = 0;
313 
314  instakill = level.zombie_vars[player.team]["zombie_insta_kill"];
315 
316  ‪death = [[ level.audio_get_mod_type ]]( hit_location, mod, weapon, zombie, instakill, dist, player );
317  if ( !isdefined(‪death))
318  {
319  return undefined;
320  }
321 
322  if( !‪IS_TRUE(player.force_wait_on_kill_line) )
323  {
324  player.force_wait_on_kill_line = true;
325  player ‪create_and_play_dialog( "kill", ‪death );
326  wait(2);
327  if(isdefined(player)) // Host migration or simple disconnection during this wait can lead to the following line causing an SRE.
328  {
329  player.force_wait_on_kill_line = false;
330  }
331  }
332 }
333 
334 function ‪get_response_chance( event )
335 {
336  if(!isDefined(level.response_chances[event] ))
337  {
338  return 0;
339  }
340  return level.response_chances[event];
341 }
342 
343 function ‪get_mod_type( impact, mod, weapon, zombie, instakill, dist, player )
344 {
345  close_dist = 64 * 64;
346  med_dist = 124 * 124;
347  far_dist = 400 * 400;
348 
349  if( weapon.name == "hero_annihilator" )
350  {
351  return "annihilator";
352  }
353 
354  if( ‪zm_utility::is_placeable_mine( weapon ) )
355  {
356  if( !instakill )
357  return "betty";
358  else
359  return "weapon_instakill";
360  }
361 
362  if ( zombie.damageweapon.name == "cymbal_monkey" )
363  {
364  if(instakill)
365  return "weapon_instakill";
366  else
367  return "monkey";
368  }
369 
370  //RAYGUN & RAYGUN_INSTAKILL
371  if( weapon.name == "ray_gun" && dist > far_dist )
372  {
373  if( !instakill )
374  return "raygun";
375  else
376  return "weapon_instakill";
377  }
378 
379  //HEADSHOT
380  if( ‪zm_utility::is_headshot(weapon,impact,mod) && dist >= far_dist )
381  {
382  return "headshot";
383  }
384 
385  //MELEE & MELEE_INSTAKILL
386  if ( (mod == "MOD_MELEE" || mod == "MOD_UNKNOWN") && dist < close_dist )
387  {
388  if( !instakill )
389  return "melee";
390  else
391  return "melee_instakill";
392  }
393 
394  //EXPLOSIVE & EXPLOSIVE_INSTAKILL
395  if( ‪zm_utility::is_explosive_damage( mod ) && weapon.name != "ray_gun" && !‪IS_TRUE(zombie.is_on_fire) )
396  {
397  if( !instakill )
398  return "explosive";
399  else
400  return "weapon_instakill";
401  }
402 
403  //FLAME & FLAME_INSTAKILL
404  if( weapon.doesFireDamage && ( mod == "MOD_BURNED" || mod == "MOD_GRENADE" || mod == "MOD_GRENADE_SPLASH" ) )
405  {
406  if( !instakill )
407  return "flame";
408  else
409  return "weapon_instakill";
410  }
411 
412  if (!isdefined(impact))
413  impact = "";
414 
415  //BULLET & BULLET_INSTAKILL
416  if( mod == "MOD_RIFLE_BULLET" || mod == "MOD_PISTOL_BULLET" )
417  {
418  if( !instakill )
419  return "bullet";
420  else
421  return "weapon_instakill";
422  }
423 
424  if(instakill)
425  {
426  return "default";
427  }
428 
429  //CRAWLER
430  if( mod != "MOD_MELEE" && zombie.missingLegs )
431  {
432  return "crawler";
433  }
434 
435  //CLOSEKILL
436  if( mod != "MOD_BURNED" && dist < close_dist )
437  {
438  return "close";
439  }
440 
441  return "default";
442 }
443 
444 function ‪timer_actual(kills, time)
445 {
446  self endon("disconnect");
447  self endon("death");
448 
449  ‪timer = gettime() + (time * 1000);
450  while(getTime() < ‪timer)
451  {
452  if (self.killcounter > kills )
453  {
454  self ‪create_and_play_dialog( "kill", "streak" );
455 
456  wait(1);
457 
458  //resets the killcounter and the timer
459  self.killcounter = 0;
460 
461  ‪timer = -1;
462  }
463  wait(0.1);
464  }
465  wait(10); //10 seconds before he can say this again
466  self.killcounter = 0;
467  self.timerIsrunning = 0;
468 }
469 
470 function ‪zmbVoxCreate()
471 {
472  vox = SpawnStruct();
473  vox.speaker = [];
474  return( vox );
475 }
476 function ‪zmbVoxInitSpeaker( speaker, prefix, ent )
477 {
478  ent.zmbVoxID = speaker;
479 
480  if( !isdefined( self.speaker[speaker] ) )
481  {
482  self.speaker[speaker] = SpawnStruct();
483  self.speaker[speaker].alias = [];
484  }
485 
486  self.speaker[speaker].prefix = prefix;
487  self.speaker[speaker].ent = ent;
488 }
489 
490 #define KILL_DAMAGE_VO_DURATION 2
491 function ‪custom_kill_damaged_VO( player ) // self = zombie
492 {
493  self notify( "sound_damage_player_updated" );
494 
495  self endon( "death" );
496  self endon( "sound_damage_player_updated" );
497 
498  self.sound_damage_player = player;
499 
501 
502  self.sound_damage_player = undefined;
503 }
504 
505 
506 /*
507  *
508  * UPDATED DIALOG SYSTEM SECTION
509  * Contains new way of importing lines per level
510  * Cleans up unneeded function and uses
511  * Check out _zm_audio.gsh for definitions if unsure
512  *
513  */
514 
516 {
517  level.votimer = [];
518  level.sndPlayerVox = [];
519 
520  index = 0;
521  row = TableLookupRow( table, index );
522 
523  while ( isdefined( row ) )
524  {
525  //Get this weapons data from the current tablerow
529  percentage = int( row[‪VOX_TABLE_COL_PERCENTAGE] );
530 
531  if( percentage <= 0 )
532  percentage = 100;
533 
535 
536  if( ‪IS_TRUE( response ) )
537  {
538  for (i=0; i<4; i++)
539  {
540  ‪zmbVoxAdd( category, subcategory + ‪RESPOND_APPEND + i, suffix + ‪RESPOND_APPEND + i, ‪RESPONSE_PERCENTAGE, false );
541  }
542  }
543 
544  delayBeforePlayAgain = ‪checkIntValid( row[‪VOX_TABLE_COL_DELAYBEFOREPLAY] );
545 
546  ‪zmbVoxAdd( category, subcategory, suffix, percentage, response, delayBeforePlayAgain );
547 
548  index++;
549  row = TableLookupRow( table, index );
550  }
551 }
552 function ‪checkStringValid( str )
553 {
554  if( str != "" )
555  return str;
556  return undefined;
557 }
558 function ‪checkStringTrue( str )
559 {
560  if( !isdefined( str ) )
561  return false;
562 
563  if( str != "" )
564  {
565  if( ToLower( str ) == "true" )
566  return true;
567  }
568  return false;
569 }
570 function ‪checkIntValid( value, defaultValue = 0 )
571 {
572  if( !isdefined( value ) )
573  return defaultValue;
574 
575  if( value == "" )
576  return defaultValue;
577 
578  return Int( value );
579 }
580 function ‪zmbVoxAdd( category, subcategory, suffix, percentage, response, delayBeforePlayAgain = 0 )
581 {
582  Assert( IsDefined( category ) );
583  Assert( IsDefined( subcategory ) );
584  Assert( IsDefined( suffix ) );
585  Assert( IsDefined( percentage ) );
586  Assert( IsDefined( response ) );
587  Assert( IsDefined( delayBeforePlayAgain ) );
588 
589  vox = level.sndPlayerVox;
590 
591  if( !isdefined( vox[category] ) )
592  vox[category] = [];
593 
594  vox[category][subcategory] = spawnstruct();
595  vox[category][subcategory].suffix = suffix;
596  vox[category][subcategory].percentage = percentage;
597  vox[category][subcategory].response = response;
598  vox[category][subcategory].delayBeforePlayAgain = delayBeforePlayAgain;
599 
600  ‪zm_utility::create_vox_timer(subcategory);
601 }
602 
603 function ‪create_and_play_dialog( category, subcategory, force_variant )
604 {
605  if( !IsDefined( level.sndPlayerVox ) )
606  return;
607 
608  if( !IsDefined( level.sndPlayerVox[category] ) )
609  return;
610 
611  if( !IsDefined( level.sndPlayerVox[category][subcategory] ) )
612  {
613  return;
614  }
615 
616  // Checks for total level sound override or whether the player is speaking (and isn't waiting to speak)
617  if( ‪IS_TRUE( level.sndVoxOverride ) || ( ‪IS_TRUE( self.isSpeaking ) && !‪IS_TRUE( self.b_wait_if_busy ) ) )
618  {
619  return;
620  }
621 
622  suffix = level.sndPlayerVox[category][subcategory].suffix;
623  percentage = level.sndPlayerVox[category][subcategory].percentage;
624 
625  prefix = ‪shouldPlayerSpeak(self, category, subcategory, percentage );
626  if( !isdefined( prefix ) )
627  return;
628 
629  sound_to_play = self ‪zmbVoxGetLineVariant( prefix, suffix, force_variant );
630 
631  if( isdefined( sound_to_play ) )
632  {
633  self thread ‪do_player_or_npc_playvox( sound_to_play, category, subcategory );
634  }
635  else
636  {
637  }
638 }
639 
640 function ‪do_player_or_npc_playvox( sound_to_play, category, subcategory )
641 {
642  self endon("death_or_disconnect");
643 
644  // If beastmode EXISTS and is on for me, cancel the speech.
645  // Not all levels have beast mode, so we need to check its existence before checking its setting.
646  if ((self ‪flag::exists( "in_beastmode" )) && (self ‪flag::get( "in_beastmode" )))
647  {
648  return;
649  }
650 
651  // Leaving this in for all the other legacy functions that use this boolean.
652  if ( !isdefined( self.isSpeaking ) )
653  {
654  self.isSpeaking = false;
655  }
656 
657  if ( self.isSpeaking ) // If already speaking, cancel the speech.
658  {
659  return;
660  }
661 
662  waittime = 1;
663 
664  if ( !self ‪areNearbySpeakersActive() || ‪IS_TRUE( self.ignoreNearbySpkrs ) )
665  {
666  self.speakingLine = sound_to_play;
667 
668  self.isSpeaking = true; // TODO: this will eventually be converted to a flag.
669 
670  if(isPlayer(self))
671  {
672  self ‪clientfield::set_to_player( "isspeaking",1 );
673  }
674 
675  playbackTime = soundgetplaybacktime( sound_to_play );
676 
677  if( !isdefined( playbackTime ) )
678  return;
679 
680  if ( playbackTime >= 0 )
681  {
682  playbackTime = playbackTime * .001;
683  }
684  else
685  {
686  playbackTime = 1;
687  }
688 
689  if( isdefined( level._do_player_or_npc_playvox_override ) )
690  {
691  self thread [[level._do_player_or_npc_playvox_override]](sound_to_play, playbackTime);
692  wait(playbackTime);
693  }
694  else if ( !self IsTestClient() )
695  {
696  self PlaySoundOnTag( sound_to_play, "J_Head" );
697  wait(playbackTime);
698  }
699 
700  if( isPlayer(self) && isDefined(self.last_vo_played_time) )
701  {
702  if( GetTime() < ( self.last_vo_played_time + 5000 ) )
703  {
704  self.last_vo_played_time = GetTime();
705  waittime = 7;
706  }
707  }
708 
709  wait( waittime );
710 
711  self.isSpeaking = false; // TODO: this will eventually be converted to a flag.
712 
713  if(isPlayer(self))
714  {
715  self ‪clientfield::set_to_player( "isspeaking",0 );
716  }
717 
718  if( !level ‪flag::get( "solo_game" ) && ‪IS_TRUE( level.sndPlayerVox[category][subcategory].response ) )
719  {
720  if( ‪IS_TRUE( level.vox_response_override ) )
721  {
722  level thread ‪setup_response_line_override( self, category, subcategory );
723  }
724  else
725  {
726  level thread ‪setup_response_line( self, category, subcategory );
727  }
728  }
729  }
730 }
731 
732 function ‪setup_response_line_override( player, category, subcategory )
733 {
734  if(isdefined(level._audio_custom_response_line))
735  {
736  self thread [[level._audio_custom_response_line]]( player, category, subcategory );
737  }
738  else
739  {
740  switch( player.characterindex )
741  {
743  level ‪setup_hero_rival( player, ‪NIKOLAI_CHAR_INDEX_R, ‪RICHTOFEN_CHAR_INDEX_R, category, subcategory );
744  break;
745 
747  level ‪setup_hero_rival( player, ‪RICHTOFEN_CHAR_INDEX_R, ‪TAKEO_CHAR_INDEX_R, category, subcategory );
748  break;
749 
751  level ‪setup_hero_rival( player, ‪DEMPSEY_CHAR_INDEX_R, ‪NIKOLAI_CHAR_INDEX_R, category, subcategory );
752  break;
753 
755  level ‪setup_hero_rival( player, ‪TAKEO_CHAR_INDEX_R, ‪DEMPSEY_CHAR_INDEX_R, category, subcategory );
756  break;
757  }
758  }
759  return;
760 }
761 
762 function ‪setup_hero_rival( player, hero, rival, category, type )
763 {
764  players = GetPlayers();
765 
766  hero_player = undefined;
767  rival_player = undefined;
768 
769  foreach(ent in players)
770  {
771  if(ent.characterIndex == hero )
772  {
773  hero_player = ent;
774  }
775  else if (ent.characterIndex == rival )
776  {
777  rival_player = ent;
778  }
779  }
780 
781  if(isDefined(hero_player) && isDefined(rival_player))
782  {
783  if( randomint(100) > 50 )
784  {
785  hero_player = undefined;
786  }
787  else
788  {
789  rival_player = undefined;
790  }
791  }
792  if( IsDefined( hero_player ) && distancesquared (player.origin, hero_player.origin) < 500*500 )
793  {
794  if( ‪IS_TRUE( player.isSamantha ) )
795  {
796  hero_player ‪create_and_play_dialog( category, type + "_s" );
797  }
798  else
799  {
800  hero_player ‪create_and_play_dialog( category, type + "_hr" );
801  }
802  }
803  else if(IsDefined( rival_player ) && distancesquared (player.origin, rival_player.origin) < 500*500 )
804  {
805  if( ‪IS_TRUE( player.isSamantha ) )
806  {
807  rival_player ‪create_and_play_dialog( category, type + "_s" );
808  }
809  else
810  {
811  rival_player ‪create_and_play_dialog( category, type + "_riv" );
812  }
813  }
814 }
815 
816 function ‪setup_response_line( player, category, subcategory )
817 {
818  players = array::get_all_closest( player.origin, level.activeplayers );
819 
820  players_that_can_respond = array::exclude( players, player );
821 
822  if ( players_that_can_respond.size == 0 )
823  {
824  return;
825  }
826 
827  player_to_respond = players_that_can_respond[0];
828 
829  if( distancesquared (player.origin, player_to_respond.origin) < ‪RESPONSE_LINE_MAX_DIST )
830  {
831  player_to_respond ‪create_and_play_dialog( category, subcategory + ‪RESPOND_APPEND + player.characterindex );
832  }
833 }
834 
835 function ‪shouldPlayerSpeak(player, category, subcategory, percentage )
836 {
837  if ( !IsDefined(player) )
838  return undefined;
839 
840  if( !player ‪zm_utility::is_player() )
841  return undefined;
842 
843  if( player ‪zm_utility::is_player() )
844  {
845  if ( player.sessionstate != "playing" )
846  return undefined;
847 
848  if( player ‪laststand::player_is_in_laststand() && ( subcategory != "revive_down" || subcategory != "revive_up" ) )
849  return undefined;
850 
851  if( player IsPlayerUnderwater() )
852  return undefined;
853  }
854 
855  if(‪IS_TRUE(player.dontspeak))
856  return undefined;
857 
858  if( percentage < randomintrange(1,101) )
859  return undefined;
860 
861  if( ‪isVoxOnCooldown(player, category, subcategory) )
862  return undefined;
863 
864  index = ‪zm_utility::get_player_index(player);
865 
866  if( ‪IS_TRUE( player.isSamantha ) )
867  index = 4;
868 
869  return ‪PLAYER_PREFIX + index + "_";
870 }
871 function ‪isVoxOnCooldown(player, category, subcategory)
872 {
873  if( level.sndPlayerVox[category][subcategory].delayBeforePlayAgain <= 0 )
874  return false;
875 
876  fullName = category + subcategory;
877  if( !isdefined( player.voxTimer ) )
878  {
879  player.voxTimer = [];
880  }
881  if( !isdefined( player.voxTimer[fullName] ) )
882  {
883  player.voxTimer[fullName] = GetTime();
884  return false;
885  }
886 
887  time = GetTime();
888  if( ( time - player.voxTimer[fullName] ) <= ( level.sndPlayerVox[category][subcategory].delayBeforePlayAgain * 1000 ) )
889  {
890  return true;
891  }
892 
893  player.voxTimer[fullName] = time;
894  return false;
895 }
896 function ‪zmbVoxGetLineVariant( prefix, suffix, force_variant )
897 {
898  if( !IsDefined ( self.sound_dialog ) )
899  {
900  self.sound_dialog = [];
901  self.sound_dialog_available = [];
902  }
903 
904  if ( !IsDefined ( self.sound_dialog[ suffix ] ) )
905  {
906  num_variants = ‪zm_spawner::get_number_variants( prefix + suffix );
907 
908  if( num_variants <= 0 )
909  {
910  return undefined;
911  }
912 
913  for( i = 0; i < num_variants; i++ )
914  {
915  self.sound_dialog[ suffix ][ i ] = i;
916  }
917 
918  self.sound_dialog_available[ suffix ] = [];
919  }
920 
921  if ( self.sound_dialog_available[ suffix ].size <= 0 )
922  {
923  for( i = 0; i < self.sound_dialog[ suffix ].size; i++ )
924  {
925  self.sound_dialog_available[ suffix ][i] = self.sound_dialog[ suffix ][i];
926  }
927  }
928 
929  variation = array::random( self.sound_dialog_available[ suffix ] );
930  ArrayRemoveValue( self.sound_dialog_available[ suffix ], variation );
931 
932  if( IsDefined( force_variant ) )
933  {
934  variation = force_variant;
935  }
936 
937  return (prefix + suffix + "_" + variation);
938 }
939 function ‪areNearbySpeakersActive( radius = 1000 )
940 {
941  // The radius by default is Twice Range Of Response Radius (Which Is Currently 500 Units)
942 
943  nearbySpeakerActive = false;
944 
945  speakers = GetPlayers();
946 
947  foreach ( person in speakers )
948  {
949  if ( self == person )
950  {
951  continue;
952  }
953 
954  if ( person ‪zm_utility::is_player() )
955  {
956  // Nearby Player Isn't Currently Playing
957  //--------------------------------------
958  if ( person.sessionstate != "playing" )
959  {
960  continue;
961  }
962 
963  // Nearby Player In Last Stand
964  //----------------------------
966  {
967  continue;
968  }
969  }
970 
971  if ( ‪IS_TRUE( person.isSpeaking ) && !‪IS_TRUE( person.ignoreNearbySpkrs ) )
972  {
973  if ( DistanceSquared( self.origin, person.origin ) < ( radius * radius ) )
974  {
975  nearbySpeakerActive = true;
976  }
977  }
978  }
979 
980  return nearbySpeakerActive;
981 }
982 
983 /*
984  *
985  * MUSIC
986  * Encompasses both the standard Round Start/End Music system, and the updated system added in MOTD, Buried, Origins
987  *
988  *
989  */
990 
991 function ‪musicState_Create( stateName, playType = ‪PLAYTYPE_REJECT, musName1, musName2, musName3, musName4, musName5, musName6 )
992 {
993  if( !isdefined( level.musicSystem ) )
994  {
995  level.musicSystem = spawnstruct();
996  level.musicSystem.queue = false;
997  level.musicSystem.currentPlaytype = ‪PLAYTYPE_NONE;
998  level.musicSystem.currentSet = undefined;
999  level.musicSystem.states = [];
1000  }
1001 
1002  level.musicSystem.states[stateName] = spawnstruct();
1003  level.musicSystem.states[stateName].playType = playType;
1004  level.musicSystem.states[stateName].musArray = ‪array();
1005 
1006  if( isdefined( musName1 ) )
1007  ‪array::add(level.musicSystem.states[stateName].musArray,musName1);
1008  if( isdefined( musName2 ) )
1009  ‪array::add(level.musicSystem.states[stateName].musArray,musName2);
1010  if( isdefined( musName3 ) )
1011  ‪array::add(level.musicSystem.states[stateName].musArray,musName3);
1012  if( isdefined( musName4 ) )
1013  ‪array::add(level.musicSystem.states[stateName].musArray,musName4);
1014  if( isdefined( musName5 ) )
1015  ‪array::add(level.musicSystem.states[stateName].musArray,musName5);
1016  if( isdefined( musName6 ) )
1017  ‪array::add(level.musicSystem.states[stateName].musArray,musName6);
1018 }
1019 
1020 function ‪sndMusicSystem_CreateState( state, stateName, playtype = ‪PLAYTYPE_REJECT, ‪delay = 0 )
1021 {
1022  if( !isdefined( level.musicSystem ) )
1023  {
1024  level.musicSystem = spawnstruct();
1025  level.musicSystem.ent = ‪spawn( "script_origin", (0,0,0) );
1026  level.musicSystem.queue = false;
1027  level.musicSystem.currentPlaytype = 0;
1028  level.musicSystem.currentState = undefined;
1029  level.musicSystem.states = [];
1030  }
1031 
1032  m = level.musicSystem;
1033  if( !isdefined( m.states[state] ) )
1034  {
1035  m.states[state] = spawnstruct();
1036  m.states[state] = ‪array();
1037  }
1038 
1039  m.states[state][m.states[state].size].stateName = stateName;
1040  m.states[state][m.states[state].size].playtype = playtype;
1041 }
1043 {
1044  if( !isdefined( level.musicSystem ) )
1045  return;
1046 
1047  m = level.musicSystem;
1048 
1049  if( !isdefined( m.states[state] ) )
1050  return;
1051 
1052  s = level.musicSystem.states[state];
1053  playtype = s.playtype;
1054 
1055  if( m.currentPlaytype > 0 )
1056  {
1057  if( playtype == ‪PLAYTYPE_REJECT )
1058  {
1059  break;
1060  }
1061  else if( playtype == ‪PLAYTYPE_QUEUE )
1062  {
1063  level thread ‪sndMusicSystem_QueueState(state);
1064  }
1065  else if( playtype > m.currentPlaytype || (playtype == ‪PLAYTYPE_ROUND && m.currentPlaytype == ‪PLAYTYPE_ROUND ) )
1066  {
1067  if( ‪IS_TRUE( level.musicSystemOverride ) && playtype != ‪PLAYTYPE_GAMEEND ) //Allowing me to go into a special music mode that prevents all other music from playing
1068  return;
1069  else
1070  {
1072  level thread ‪playState( state );
1073  }
1074  }
1075  }
1076  else if( !‪IS_TRUE( level.musicSystemOverride ) || playtype == ‪PLAYTYPE_GAMEEND )
1077  {
1078  level thread ‪playState( state );
1079  }
1080 }
1081 function ‪playState( state )
1082 {
1083  level endon( "sndStateStop" );
1084 
1085  m = level.musicSystem;
1086  musArray = level.musicSystem.states[state].musArray;
1087 
1088  if( musArray.size <= 0 )
1089  return;
1090 
1091  musToPlay = musArray[randomintrange(0,musArray.size)];
1092 
1093  m.currentPlaytype = m.states[state].playtype;
1094  m.currentState = state;
1095 
1096  wait( .1 );
1097 
1098  if( isdefined( level.sndPlayStateOverride ) )
1099  {
1100  perPlayer = level [[level.sndPlayStateOverride]](state);
1101  if( !‪IS_TRUE(perPlayer) )
1102  {
1103  music::setmusicstate(musToPlay);
1104  }
1105  }
1106  else
1107  {
1108  music::setmusicstate(musToPlay);
1109  }
1110 
1111  aliasname = "mus_" + musToPlay + "_intro";
1112  playbacktime = soundgetplaybacktime( aliasname );
1113  if( !isdefined( playbacktime ) || playbacktime <= 0 )
1114  waittime = 1;
1115  else
1116  waittime = playbackTime * .001;
1117 
1118  wait(waittime);
1119 
1120  //music::setmusicstate("none");
1121  m.currentPlaytype = 0;
1122  m.currentState = undefined;
1123 }
1125 {
1126  level endon( "sndQueueFlush" );
1127 
1128  m = level.musicSystem;
1129  count = 0;
1130 
1131  if( ‪IS_TRUE( m.queue ) )
1132  {
1133  return;
1134  }
1135  else
1136  {
1137  m.queue = true;
1138 
1139  while(m.currentPlaytype > 0)
1140  {
1141  wait(.5);
1142  count++;
1143  if( count >= 25 )
1144  {
1145  m.queue = false;
1146  return;
1147  }
1148  }
1149 
1150  level thread ‪playState( state );
1151 
1152  m.queue = false;
1153  }
1154 }
1156 {
1157  level notify( "sndQueueFlush" );
1158  level.musicSystem.queue = false;
1159 
1160  level notify( "sndStateStop" );
1161  //music::setmusicstate("none");
1162  level.musicSystem.currentPlaytype = 0;
1163  level.musicSystem.currentState = undefined;
1164 }
1165 
1167 {
1168  if( !isdefined( level.musicSystem ) )
1169  return false;
1170 
1171  if( !isdefined( level.musicSystem.currentPlaytype ) )
1172  return false;
1173 
1174  if( level.musicSystem.currentPlaytype >= 4 )
1175  return false;
1176 
1177  return true;
1178 }
1179 
1180 #define LOCATION_NUM_UNTIL_REPEAT 3
1181 function ‪sndMusicSystem_LocationsInit(locationArray)
1182 {
1183  if( !isdefined( locationArray ) || locationArray.size <= 0 )
1184  return;
1185 
1186  level.musicSystem.locationArray = locationArray;
1187  level thread ‪sndMusicSystem_Locations(locationArray);
1188 }
1189 function ‪sndMusicSystem_Locations(locationArray)
1190 {
1191  numCut = 0;
1192  level.sndLastZone = undefined;
1193 
1194  m = level.musicSystem;
1195 
1196  while(1)
1197  {
1198  level waittill( "newzoneActive", activeZone );
1199 
1200  wait(.1);
1201 
1202  if( !‪sndLocationShouldPlay( locationArray, activeZone ) )
1203  {
1204  continue;
1205  }
1206 
1207  level thread ‪sndMusicSystem_PlayState( activeZone );
1208 
1209  locationArray = ‪sndCurrentLocationArray( locationArray, activeZone, numCut, ‪LOCATION_NUM_UNTIL_REPEAT );
1210  level.sndLastZone = activeZone;
1211 
1212  if( numCut >= ‪LOCATION_NUM_UNTIL_REPEAT )
1213  numCut = 0;
1214  else
1215  numCut++;
1216 
1217  level waittill( "between_round_over" );
1218  }
1219 }
1221 {
1222  shouldPlay = false;
1223 
1224  if( level.musicSystem.currentPlaytype >= ‪PLAYTYPE_ROUND )
1225  {
1226  level thread ‪sndLocationQueue( activeZone );
1227  return shouldPlay;
1228  }
1229 
1230  foreach( place in ‪array )
1231  {
1232  if( place == activeZone )
1233  shouldPlay = true;
1234  }
1235 
1236  if( shouldPlay == false )
1237  return shouldPlay;
1238 
1239  if( ‪zm_zonemgr::any_player_in_zone( activeZone ) )
1240  shouldPlay = true;
1241  else
1242  shouldPlay = false;
1243 
1244  return shouldPlay;
1245 }
1246 function ‪sndCurrentLocationArray( current_array, activeZone, numCut, num )
1247 {
1248  if( numCut >= num )
1249  {
1250  current_array = level.musicSystem.locationArray;
1251  }
1252 
1253  foreach( place in current_array )
1254  {
1255  if( place == activeZone )
1256  {
1257  arrayremovevalue( current_array, place );
1258  break;
1259  }
1260  }
1261  return current_array;
1262 }
1263 function ‪sndLocationQueue( zone )
1264 {
1265  level endon( "newzoneActive" );
1266 
1267  while( level.musicSystem.currentPlaytype >= ‪PLAYTYPE_ROUND )
1268  wait.5;
1269 
1270  level notify( "newzoneActive", zone );
1271 }
1272 
1273 function ‪sndMusicSystem_EESetup(state, origin1, origin2, origin3, origin4, origin5)
1274 {
1275 }
1276 function ‪sndMusicSystem_EEWait( origin, state )
1277 {
1278 }
1279 function ‪sndMusicSystem_EEOverride(arg1,arg2)
1280 {
1281 }
1282 function ‪secretUse(notify_string, color, qualifier_func, arg1, arg2 )
1283 {
1284 }
1285 
1286 /*
1287  *
1288  * ANNOUNCER VOX: Don't need an overly complicated system, just a few simple functions
1289  * Will simply play announcer vox in 2d. Prefix can be changed in level gsc if we need a new announcer
1290  *
1291  *
1292  */
1293 
1294  #define ZOMBIE_ANNOUNCER_PREFIX "zmba"
1296 {
1297  if( !isdefined( level.zmAnnouncerPrefix ) )
1298  level.zmAnnouncerPrefix = "vox_"+‪ZOMBIE_ANNOUNCER_PREFIX+"_";
1299 
1300  ‪sndAnnouncerVoxAdd( "carpenter", "powerup_carpenter_0" );
1301  ‪sndAnnouncerVoxAdd( "insta_kill", "powerup_instakill_0" );
1302  ‪sndAnnouncerVoxAdd( "double_points", "powerup_doublepoints_0" );
1303  ‪sndAnnouncerVoxAdd( "nuke", "powerup_nuke_0" );
1304  ‪sndAnnouncerVoxAdd( "full_ammo", "powerup_maxammo_0" );
1305  ‪sndAnnouncerVoxAdd( "fire_sale", "powerup_firesale_0" );
1306  ‪sndAnnouncerVoxAdd( "minigun", "powerup_death_machine_0" );
1307  ‪sndAnnouncerVoxAdd( "boxmove", "event_magicbox_0" );
1308  ‪sndAnnouncerVoxAdd( "dogstart", "event_dogstart_0" );
1309 }
1310 function ‪sndAnnouncerVoxAdd( type, suffix )
1311 {
1312  if( !isdefined( level.zmAnnouncerVox ) )
1313  {
1314  level.zmAnnouncerVox = ‪array();
1315  }
1316 
1317  level.zmAnnouncerVox[type] = suffix;
1318 }
1319 function ‪sndAnnouncerPlayVox(type, player)
1320 {
1321  if( !isdefined( level.zmAnnouncerVox[type] ) )
1322  return;
1323 
1324  prefix = level.zmAnnouncerPrefix;
1325  suffix = level.zmAnnouncerVox[type];
1326 
1327  if( !‪IS_TRUE( level.zmAnnouncerTalking ) )
1328  {
1329  if( !isdefined( player ) )
1330  {
1331  level.zmAnnouncerTalking = true;
1332 
1333  temp_ent = ‪spawn("script_origin", (0,0,0));
1334  temp_ent PlaySoundWithNotify(prefix+suffix, prefix+suffix+"wait");
1335  temp_ent waittill(prefix+suffix+"wait");
1337  temp_ent delete();
1338 
1339  level.zmAnnouncerTalking = false;
1340  }
1341  else
1342  {
1343  player playsoundtoplayer( prefix+suffix, player );
1344  }
1345  }
1346 }
1347 
1348 /*
1349  *
1350  * ZOMBIE VOX: Moving to the notify system, most vox is still script based, but death and attack are from AI Editor
1351  *
1352  */
1353 
1355 {
1356  self endon ( "death" );
1357  self endon ( "disconnect" );
1358  level endon ( "game_ended" );
1359 
1360  self thread ‪zmbAIVox_PlayDeath();
1361  self thread ‪zmbAIVox_PlayElectrocution();
1362 
1363  while (1)
1364 {
1365  self waittill("bhtn_action_notify", notify_string);
1366 
1367  switch( notify_string )
1368  {
1369  case "pain":
1370  level thread ‪zmbAIVox_PlayVox( self, notify_string, true, 9 );
1371  break;
1372  case "death":
1373  if( ‪IS_TRUE( self.bgb_tone_death ) )
1374  level thread ‪zmbAIVox_PlayVox( self, "death_whimsy", true, 10 );
1375  else
1376  level thread ‪zmbAIVox_PlayVox( self, notify_string, true, 10 );
1377  break;
1378  case "behind":
1379  level thread ‪zmbAIVox_PlayVox( self, notify_string, true, 9 );
1380  break;
1381  case "attack_melee":
1382  if( !isdefined( self.animname ) || ( self.animname != "zombie" && self.animname != "quad_zombie" ) ) //Moving standard zombie attack vocals to anims, adding this check here as an easy way to keep them out of playing through script
1383  level thread ‪zmbAIVox_PlayVox( self, notify_string, true, 8, true );
1384  break;
1385  case "attack_melee_zhd": //Technically not just ZHD, but new way of hooking up attack vocals
1386  level thread ‪zmbAIVox_PlayVox( self, "attack_melee", true, 8, true );
1387  break;
1388  case "electrocute":
1389  level thread ‪zmbAIVox_PlayVox( self, notify_string, true, 7 );
1390  break;
1391  case "close":
1392  level thread ‪zmbAIVox_PlayVox( self, notify_string, true, 6 );
1393  break;
1394  case "teardown":
1395  case "taunt":
1396  case "ambient":
1397  case "sprint":
1398  case "crawler":
1399  level thread ‪zmbAIVox_PlayVox( self, notify_string, false );
1400  break;
1401  default:
1402  {
1403  if ( IsDefined( level._zmbAIVox_SpecialType ) )
1404  {
1405  if( isdefined( level._zmbAIVox_SpecialType[notify_string] ) )
1406  {
1407  level thread ‪zmbAIVox_PlayVox( self, notify_string, false );
1408  }
1409  }
1410  break;
1411  }
1412  }
1413  }
1414 }
1415 function ‪zmbAIVox_PlayVox( zombie, type, override, priority, delayAmbientVox = false )
1416 {
1417  zombie endon( "death" );
1418 
1419  if( !isdefined( zombie ) )
1420  return;
1421 
1422  if( !isdefined( zombie.voicePrefix ) )
1423  return;
1424 
1425  if( !isdefined( priority ) )
1426  priority = 1;
1427 
1428  if( !isdefined( zombie.currentvoxpriority ) )
1429  zombie.currentvoxpriority = 1;
1430 
1431  if( !isdefined( self.delayAmbientVox ) )
1432  self.delayAmbientVox = false;
1433 
1434  if( ( type == "ambient" || type == "sprint" || type == "crawler" ) && ‪IS_TRUE( self.delayAmbientVox ) ) //Prevents ambient/sprint/crawl vocals from playing immediately after a vox set with delayAmbientVox plays
1435  return;
1436 
1437  if( delayAmbientVox )
1438  {
1439  self.delayAmbientVox = true;
1440  self thread ‪zmbAIVox_AmbientDelay();
1441  }
1442 
1443  alias = "zmb_vocals_" + zombie.voicePrefix + "_" + type;
1444 
1445  if( ‪sndIsNetworkSafe() )
1446  {
1447  if( ‪IS_TRUE( override ) )
1448  {
1449  if (isdefined( zombie.currentvox ) && priority > zombie.currentvoxpriority )
1450  {
1451  zombie stopsound ( zombie.currentvox );
1452  }
1453 
1454  if( type == "death" || type == "death_whimsy" )
1455  {
1456  zombie PlaySound( alias );
1457  return;
1458  }
1459  }
1460 
1461  if ( zombie.talking === true && priority < zombie.currentvoxpriority )
1462  return;
1463 
1464  zombie.talking = true;
1465 
1466  if( zombie ‪is_last_zombie() && type == "ambient" )
1467  alias = alias + "_loud";
1468 
1469  zombie.currentvox = alias;
1470  zombie.currentvoxpriority = priority;
1471 
1472  zombie PlaySoundOnTag( alias, "j_head" );
1473  playbackTime = soundgetplaybacktime( alias );
1474 
1475  if( !isdefined( playbackTime ) )
1476  playbackTime = 1;
1477 
1478  if ( playbackTime >= 0 )
1479  playbackTime = playbackTime * .001;
1480  else
1481  playbackTime = 1;
1482 
1483  wait(playbacktime);
1484  zombie.talking = false;
1485  zombie.currentvox = undefined;
1486  zombie.currentvoxpriority = 1;
1487  }
1488 
1489 }
1491 {
1492  self endon ( "disconnect" );
1493 
1494  self waittill ( "death", attacker, meansOfDeath );
1495 
1496  if ( isdefined( self ) )
1497  {
1498  if( ‪IS_TRUE( self.bgb_tone_death ) )
1499  level thread ‪zmbAIVox_PlayVox( self, "death_whimsy", true );
1500  else
1501  level thread ‪zmbAIVox_PlayVox( self, "death", true );
1502  }
1503 }
1505 {
1506  self endon ( "disconnect" );
1507  self endon( "death" );
1508 
1509  while(1)
1510  {
1511  self waittill( "damage", amount, attacker, direction_vec, point, type, tagName, ModelName, Partname, weapon );
1512  if( weapon.name == "zombie_beast_lightning_dwl" || weapon.name == "zombie_beast_lightning_dwl2" || weapon.name == "zombie_beast_lightning_dwl3" )
1513  {
1514  self notify( "bhtn_action_notify", "electrocute" );
1515  }
1516  }
1517 }
1519 {
1520  self notify( "sndAmbientDelay" );
1521  self endon( "sndAmbientDelay" );
1522  self endon( "death" );
1523  self endon( "disconnect" );
1524 
1525  wait(2);
1526 
1527  self.delayAmbientVox = false;
1528 }
1529 
1531 {
1532  while(1)
1533  {
1534  level._numZmbAIVox = 0;
1536  }
1537 }
1539 {
1540  if ( !IsDefined( level._numZmbAIVox ) )
1541  {
1542  level thread ‪networkSafeReset();
1543  }
1544 
1545  if ( level._numZmbAIVox >= 2 )
1546  {
1547  return false;
1548  }
1549 
1550  level._numZmbAIVox++;
1551  return true;
1552 }
1553 
1555 {
1557  return true;
1558 
1559  return false;
1560 }
1561 
1562 /*
1563  * Radio Easter Eggs (Or any sort of story asset)
1564  *
1565  */
1566 
1567 function ‪sndRadioSetup(alias_prefix, is_sequential = false, origin1, origin2, origin3, origin4, origin5)
1568 {
1569 }
1570 function ‪sndRadioWait(origin, radio, is_sequential, num)
1571 {
1572 }
1573 function ‪sndRadio_Override(arg1,arg2)
1574 {
1575 }
1576 
1577 
1578 //Perksacola Jingle Stuff
1580 {
1581  self endon( "death" );
1582 
1583  if( isdefined( self.sndJingleCooldown ) )
1584  {
1585  self.sndJingleCooldown = false;
1586  }
1587 
1588  while(1)
1589  {
1591 
1592  if( ‪PERKSACOLA_PROBABILITY && !‪IS_TRUE(self.sndJingleCooldown) )
1593  {
1595  }
1596  }
1597 }
1599 {
1600  self endon( "death" );
1601 
1602  if( !isdefined( self.sndJingleActive ) )
1603  {
1604  self.sndJingleActive = false;
1605  }
1606 
1607  alias = self.script_sound;
1608 
1609  if( type == ‪PERKSACOLA_STINGER )
1610  alias = self.script_label;
1611 
1612  if( isdefined( level.musicSystem ) && level.musicSystem.currentPlaytype >= ‪PLAYTYPE_SPECIAL )
1613  return;
1614 
1615  self.str_jingle_alias = alias;
1616 
1617  if( !‪IS_TRUE( self.sndJingleActive ) )
1618  {
1619  self.sndJingleActive = true;
1620  self playsoundwithnotify( alias, "sndDone" );
1621 
1622  playbacktime = soundgetplaybacktime( alias );
1623  if( !isdefined( playbacktime ) || playbacktime <= 0 )
1624  waittime = 1;
1625  else
1626  waittime = playbackTime * .001;
1627 
1628  wait(waittime);
1629 
1630  if( type == ‪PERKSACOLA_JINGLE )
1631  {
1632  self.sndJingleCooldown = true;
1633  self thread ‪sndPerksJingles_Cooldown();
1634  }
1635 
1636  self.sndJingleActive = false;
1637  }
1638 }
1640 {
1641  self endon( "death" );
1642 
1643  wait(45);
1644  self.sndJingleCooldown = false;
1645 }
1646 
1647 /*
1648  *
1649  * CONVERSATIONS
1650  * These will shut off normal player lines for the duration of the conversation
1651  * Conversations can have Required Players. If a certain player character isn't in the game, the conversation won't occur
1652  * If a Player has a line in a conversation, is NOT a required player, and is NOT currently in game, the line will just be skipped
1653  *
1654  *
1655  */
1656 
1657 #define RANDOM_PLAYER 4
1658 function ‪sndConversation_Init( ‪name, specialEndon = undefined )
1659 {
1660  if( !isdefined( level.sndConversations ) )
1661  {
1662  level.sndConversations = ‪array();
1663  }
1664 
1665  level.sndConversations[‪name] = spawnstruct();
1666  level.sndConversations[‪name].specialEndon = specialEndon;
1667 }
1668 function ‪sndConversation_AddLine( ‪name, line, player_or_random, ignorePlayer = 5 )
1669 {
1670  thisConvo = level.sndConversations[‪name];
1671 
1672  if( !isdefined( thisConvo.line ) )
1673  {
1674  thisConvo.line = ‪array();
1675  }
1676 
1677  if( !isdefined( thisConvo.player ) )
1678  {
1679  thisConvo.player = ‪array();
1680  }
1681 
1682  if( !isdefined( thisConvo.ignorePlayer ) )
1683  {
1684  thisConvo.ignorePlayer = ‪array();
1685  }
1686 
1687  ‪ARRAY_ADD( thisConvo.line, line );
1688  ‪ARRAY_ADD( thisConvo.player, player_or_random );
1689  ‪ARRAY_ADD( thisConvo.ignorePlayer, ignorePlayer );
1690 }
1692 {
1693  thisConvo = level.sndConversations[‪name];
1694 
1695  level endon( "sndConvoInterrupt" );
1696  if( isdefined( thisConvo.specialEndon ) )
1697  {
1698  level endon( thisConvo.specialEndon );
1699  }
1700 
1701  while( ‪isAnyoneTalking() )
1702  wait(.5);
1703 
1704  while( ‪IS_TRUE( level.sndVoxOverride ) )
1705  wait(.5);
1706 
1707  level.sndVoxOverride = true;
1708  for(i=0;i<thisConvo.line.size;i++)
1709  {
1710  if( thisConvo.player[i] == ‪RANDOM_PLAYER )
1711  speaker = ‪getRandomCharacter(thisConvo.ignorePlayer[i]);
1712  else
1713  speaker = ‪getSpecificCharacter(thisConvo.player[i]);
1714 
1715  if( !isdefined( speaker ) )
1716  continue;
1717 
1718  if( ‪isCurrentSpeakerAbleToTalk(speaker) )
1719  {
1720  level.currentConvoPlayer = speaker;
1721 
1722  if( isdefined(level.vox_name_complete) )
1723  {
1724  level.currentConvoLine = thisConvo.line[i];
1725  }
1726  else
1727  {
1728  level.currentConvoLine = "vox_plr_"+speaker.characterIndex+"_"+thisConvo.line[i];
1729  speaker thread ‪sndConvoInterrupt();
1730  }
1731 
1732  speaker PlaySoundOnTag( level.currentConvoLine, "J_Head" );
1733 
1734  ‪waitPlaybackTime( level.currentConvoLine );
1735  level notify( "sndConvoLineDone" );
1736  }
1737  }
1738  level.sndVoxOverride = false;
1739  level notify( "sndConversationDone" );
1740  level.currentConvoLine = undefined;
1741  level.currentConvoPlayer = undefined;
1742 }
1744 {
1745  level notify( "sndConvoInterrupt" );
1746  level notify( "sndConversationDone" );
1747  level.sndVoxOverride = false;
1748 
1749  if( isdefined( level.currentConvoPlayer ) && isdefined( level.currentConvoLine ) )
1750  {
1751  level.currentConvoPlayer stopsound( level.currentConvoLine );
1752  level.currentConvoLine = undefined;
1753  level.currentConvoPlayer = undefined;
1754  }
1755 }
1756 function ‪waitPlaybackTime(alias)
1757 {
1758  playbackTime = soundgetplaybacktime( alias );
1759 
1760  if( !isdefined( playbackTime ) )
1761  playbackTime = 1;
1762 
1763  if ( playbackTime >= 0 )
1764  playbackTime = playbackTime * .001;
1765  else
1766  playbackTime = 1;
1767 
1768  wait(playbacktime);
1769 }
1771 {
1772  if( !isdefined( player ) )
1773  return false;
1774 
1775  if ( player.sessionstate != "playing" )
1776  return false;
1777 
1778  if( ‪IS_TRUE( player.laststand ) )
1779  return false;
1780 
1781  return true;
1782 }
1784 {
1785  ‪array = level.players;
1786  array::randomize( ‪array );
1787 
1788  foreach( guy in ‪array )
1789  {
1790  if( guy.characterIndex == ‪ignore )
1791  continue;
1792 
1793  return guy;
1794  }
1795  return undefined;
1796 }
1797 function ‪getSpecificCharacter(charIndex)
1798 {
1799  foreach( guy in level.players )
1800  {
1801  if( guy.characterIndex == charIndex )
1802  return guy;
1803  }
1804  return undefined;
1805 }
1807 {
1808  foreach( player in level.players )
1809  {
1810  if( ‪IS_TRUE( player.isSpeaking ) )
1811  {
1812  return true;
1813  }
1814  }
1815 
1816  return false;
1817 }
1819 {
1820  level endon("sndConvoLineDone");
1821 
1822  while(1)
1823  {
1824  if( !isdefined( self ) )
1825  return;
1826 
1827  max_dist_squared = 0;
1828  check_pos = self.origin;
1829  count = 0;
1830 
1831  foreach(player in level.players)
1832  {
1833  if( self == player )
1834  continue;
1835 
1836  if( distance2dsquared(player.origin, self.origin) >= 900*900 )
1837  count++;
1838  }
1839 
1840  if( count == (level.players.size-1))
1841  break;
1842 
1843  wait(0.25);
1844  }
1845 
1846  level thread ‪sndConvoStopCurrentConversation();
1847 }
1848 
1849 function ‪water_vox()
1850 {
1851  self endon ( "death" );
1852  self endon ( "disconnect" );
1853  level endon ( "end_game" );
1854 
1855  self.voxUnderwaterTime = 0;
1856  self.voxEmergeBreath = false;
1857  self.voxDrowning = false;
1858 
1859  while(1)
1860  {
1861  if ( self IsPlayerUnderwater() )
1862  {
1863  if ( !self.voxUnderwaterTime && !self.voxEmergeBreath )
1864  {
1865  self ‪vo_clear_underwater();
1866  self.voxUnderwaterTime = GetTime();
1867  }
1868  else if ( self.voxUnderwaterTime )
1869  {
1870  if ( GetTime() > self.voxUnderwaterTime + (3 * 1000) )
1871  {
1872  self.voxUnderwaterTime = 0;
1873  self.voxEmergeBreath = true;
1874  }
1875  }
1876  }
1877  else
1878  {
1879  if ( self.voxDrowning )
1880  {
1881  self zm_audio::playerexert( "underwater_gasp" );
1882 
1883  self.voxDrowning = false;
1884  self.voxEmergeBreath = false;
1885  }
1886  if ( self.voxEmergeBreath )
1887  {
1888  self zm_audio::playerexert( "underwater_emerge" );
1889  self.voxEmergeBreath = false;
1890  }
1891  else
1892  {
1893  self.voxUnderwaterTime = 0;
1894  }
1895  }
1896 
1898  }
1899 }
1900 
1902 {
1903  self StopSounds();
1904  self notify( "stop_vo_convo" );
1905 
1906  self.str_vo_being_spoken = "";
1907  self.n_vo_priority = 0;
1908  self.isSpeaking = false;
1909  level.sndVoxOverride = false;
1910 
1911  // If self is in level.a_e_speakers, remove self from it.
1912  b_in_a_e_speakers = false;
1913  foreach( e_checkme in level.a_e_speakers )
1914  {
1915  if ( e_checkme == self )
1916  {
1917  b_in_a_e_speakers = true;
1918  break;
1919  }
1920  }
1921  if (‪IS_TRUE( b_in_a_e_speakers ))
1922  {
1923  ArrayRemoveValue( level.a_e_speakers, self );
1924  }
1925 }
1926 
1927 function ‪sndPlayerHitAlert( e_victim, str_meansofdeath, e_inflictor, weapon )
1928 {
1929  if( !‪IS_TRUE( level.sndZHDAudio ) )
1930  return;
1931 
1932  if( !IsPlayer( self ) )
1933  return;
1934 
1935  if( !‪CheckForValidMod( str_meansofdeath ) )
1936  return;
1937 
1938  if( !‪CheckForValidWeapon( weapon ) )
1939  return;
1940 
1941  if( !‪CheckForValidAIType( e_victim ) )
1942  return;
1943 
1944  str_alias = "zmb_hit_alert";
1945 
1946  self thread ‪sndPlayerHitAlert_PlaySound( str_alias );
1947 }
1948 function ‪sndPlayerHitAlert_PlaySound( str_alias )
1949 {
1950  self endon ("disconnect");
1951 
1952  if( self.hitSoundTracker )
1953  {
1954  self.hitSoundTracker = false;
1955 
1956  self playsoundtoplayer( str_alias, self );
1957 
1958  wait .05;
1959 
1960  self.hitSoundTracker = true;
1961  }
1962 }
1963 function ‪CheckForValidMod( str_meansofdeath ) //TODO: Zombies will require less mods than MP to return true, find out which ones
1964 {
1965  if ( !isdefined( str_meansofdeath ) )
1966  return false;
1967 
1968  switch( str_meansofdeath )
1969  {
1970  case "MOD_CRUSH":
1971  case "MOD_GRENADE_SPLASH":
1972  case "MOD_HIT_BY_OBJECT":
1973  case "MOD_MELEE_ASSASSINATE":
1974  case "MOD_MELEE":
1975  case "MOD_MELEE_WEAPON_BUTT":
1976  return false;
1977  }
1978 
1979  return true;
1980 }
1981 function ‪CheckForValidWeapon( weapon ) //TODO: any weapons where this sound doesn't make sense, return with false
1982 {
1983  return true;
1984 }
1985 function ‪CheckForValidAIType( e_victim ) //TODO: any AI where this sound doesn't make sense, or would require a different sound (e.g. metal armor, etc), return with false
1986 {
1987  return true;
1988 }
‪PLAYTYPE_ROUND
‪#define PLAYTYPE_ROUND
Definition: _zm_audio.gsh:44
‪timer_actual
‪function timer_actual(kills, time)
Definition: _zm_audio.gsc:444
‪PERKSACOLA_PROBABILITY
‪#define PERKSACOLA_PROBABILITY
Definition: _zm_audio.gsh:36
‪PLAYTYPE_GAMEEND
‪#define PLAYTYPE_GAMEEND
Definition: zm_giant.gsc:910
‪RICHTOFEN_CHAR_INDEX_R
‪#define RICHTOFEN_CHAR_INDEX_R
Definition: _zm_audio.gsh:26
‪__init__
‪function __init__()
Definition: _zm_audio.gsc:27
‪VOX_TABLE_COL_SUBCATEGORY
‪#define VOX_TABLE_COL_SUBCATEGORY
Definition: _zm_audio.gsh:3
‪sndPlayerHitAlert_PlaySound
‪function sndPlayerHitAlert_PlaySound(str_alias)
Definition: _zm_audio.gsc:1948
‪death
‪function death(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _ai_tank.csc:134
‪sndConversation_Play
‪function sndConversation_Play(name)
Definition: _zm_audio.gsc:1691
‪getSpecificCharacter
‪function getSpecificCharacter(charIndex)
Definition: _zm_audio.gsc:1797
‪vo_clear_underwater
‪function vo_clear_underwater()
Definition: _zm_audio.gsc:1901
‪timer
‪function timer(n_time, str_endon, x, y, height)
Definition: lui_shared.gsc:163
‪player_killstreak_timer
‪function player_killstreak_timer()
Definition: _zm_audio.gsc:259
‪sndCurrentLocationArray
‪function sndCurrentLocationArray(current_array, activeZone, numCut, num)
Definition: _zm_audio.gsc:1246
‪init_audio_functions
‪function init_audio_functions()
Definition: _zm_audio.gsc:135
‪zmbVox
‪function zmbVox()
Definition: _zm_audio.gsc:104
‪custom_kill_damaged_VO
‪function custom_kill_damaged_VO(player)
Definition: _zm_audio.gsc:491
‪any_player_in_zone
‪function any_player_in_zone(zone_name)
Definition: _zm_zonemgr.gsc:189
‪sndMusicSystem_StopAndFlush
‪function sndMusicSystem_StopAndFlush()
Definition: _zm_audio.gsc:1155
‪checkStringValid
‪function checkStringValid(str)
Definition: _zm_audio.gsc:552
‪sndPerksJingles_Player
‪function sndPerksJingles_Player(type)
Definition: _zm_audio.gsc:1598
‪ignore
‪function ignore(str_system)
Definition: system_shared.csc:165
‪VOX_TABLE_COL_PERCENTAGE
‪#define VOX_TABLE_COL_PERCENTAGE
Definition: _zm_audio.gsh:5
‪set_to_player
‪function set_to_player(str_field_name, n_value)
Definition: clientfield_shared.gsc:58
‪sndMusicSystem_IsAbleToPlay
‪function sndMusicSystem_IsAbleToPlay()
Definition: _zm_audio.gsc:1166
‪PLAYER_PREFIX
‪#define PLAYER_PREFIX
Definition: _zm_audio.gsh:15
‪sndAnnouncer_Init
‪function sndAnnouncer_Init()
Definition: _zm_audio.gsc:1295
‪PLAYTYPE_SPECIAL
‪#define PLAYTYPE_SPECIAL
Definition: _zm_audio.gsh:45
‪NIKOLAI_CHAR_INDEX_R
‪#define NIKOLAI_CHAR_INDEX_R
Definition: _zm_audio.gsh:24
‪zmbAIVox_NotifyConvert
‪function zmbAIVox_NotifyConvert()
Definition: _zm_audio.gsc:1354
‪checkStringTrue
‪function checkStringTrue(str)
Definition: _zm_audio.gsc:558
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪sndMusicSystem_EESetup
‪function sndMusicSystem_EESetup(state, origin1, origin2, origin3, origin4, origin5)
Definition: _zm_audio.gsc:1273
‪setup_response_line
‪function setup_response_line(player, category, subcategory)
Definition: _zm_audio.gsc:816
‪zmbAIVox_PlayElectrocution
‪function zmbAIVox_PlayElectrocution()
Definition: _zm_audio.gsc:1504
‪checkIntValid
‪function checkIntValid(value, defaultValue=0)
Definition: _zm_audio.gsc:570
‪setup_response_line_override
‪function setup_response_line_override(player, category, subcategory)
Definition: _zm_audio.gsc:732
‪create_vox_timer
‪function create_vox_timer(type)
Definition: _zm_utility.gsc:5351
‪KILL_DAMAGE_VO_DURATION
‪#define KILL_DAMAGE_VO_DURATION
Definition: _zm_audio.gsc:490
‪sndAnnouncerPlayVox
‪function sndAnnouncerPlayVox(type, player)
Definition: _zm_audio.gsc:1319
‪waitPlaybackTime
‪function waitPlaybackTime(alias)
Definition: _zm_audio.gsc:1756
‪sndIsNetworkSafe
‪function sndIsNetworkSafe()
Definition: _zm_audio.gsc:1538
‪spawn
‪function spawn(v_origin=(0, 0, 0), v_angles=(0, 0, 0))
Definition: struct.csc:23
‪sndPerksJingles_Cooldown
‪function sndPerksJingles_Cooldown()
Definition: _zm_audio.gsc:1639
‪isCurrentSpeakerAbleToTalk
‪function isCurrentSpeakerAbleToTalk(player)
Definition: _zm_audio.gsc:1770
‪sndConversation_AddLine
‪function sndConversation_AddLine(name, line, player_or_random, ignorePlayer=5)
Definition: _zm_audio.gsc:1668
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪get_player_index
‪function get_player_index(player)
Definition: _zm_utility.gsc:5949
‪get_round_enemy_array
‪function get_round_enemy_array()
Definition: zombie_utility.gsc:2024
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪zmbVoxInitSpeaker
‪function zmbVoxInitSpeaker(speaker, prefix, ent)
Definition: _zm_audio.gsc:476
‪exert_timer
‪function exert_timer()
Definition: _zm_audio.gsc:90
‪delay
‪function delay(time_or_notify, str_endon, func, arg1, arg2, arg3, arg4, arg5, arg6)
Definition: util_shared.csc:784
‪sndAnnouncerVoxAdd
‪function sndAnnouncerVoxAdd(type, suffix)
Definition: _zm_audio.gsc:1310
‪add
‪function add(entity, dyingplayer, team, timeout)
Definition: _deathicons.gsc:43
‪sndRadioSetup
‪function sndRadioSetup(alias_prefix, is_sequential=false, origin1, origin2, origin3, origin4, origin5)
Definition: _zm_audio.gsc:1567
‪get_mod_type
‪function get_mod_type(impact, mod, weapon, zombie, instakill, dist, player)
Definition: _zm_audio.gsc:343
‪VOX_TABLE_COL_CATEGORY
‪#define VOX_TABLE_COL_CATEGORY
Definition: _zm_audio.gsh:2
‪GetYawToSpot
‪function GetYawToSpot(spot)
Definition: zombie_utility.gsc:348
‪sndPerksJingles_Timer
‪function sndPerksJingles_Timer()
Definition: _zm_audio.gsc:1579
‪LOCATION_NUM_UNTIL_REPEAT
‪#define LOCATION_NUM_UNTIL_REPEAT
Definition: _zm_audio.gsc:1180
‪zmbAIVox_PlayVox
‪function zmbAIVox_PlayVox(zombie, type, override, priority, delayAmbientVox=false)
Definition: _zm_audio.gsc:1415
‪PERKSACOLA_WAIT_TIME
‪#define PERKSACOLA_WAIT_TIME
Definition: _zm_audio.gsh:35
‪TAKEO_CHAR_INDEX_R
‪#define TAKEO_CHAR_INDEX_R
Definition: _zm_audio.gsh:25
‪sndMusicSystem_QueueState
‪function sndMusicSystem_QueueState(state)
Definition: _zm_audio.gsc:1124
‪wait_network_frame
‪function wait_network_frame(n_count=1)
Definition: util_shared.gsc:64
‪sndMusicSystem_LocationsInit
‪function sndMusicSystem_LocationsInit(locationArray)
Definition: _zm_audio.gsc:1181
‪PLAYTYPE_QUEUE
‪#define PLAYTYPE_QUEUE
Definition: _zm_audio.gsh:43
‪sndMusicSystem_PlayState
‪function sndMusicSystem_PlayState(state)
Definition: _zm_audio.gsc:1042
‪sndRadioWait
‪function sndRadioWait(origin, radio, is_sequential, num)
Definition: _zm_audio.gsc:1570
‪do_player_or_npc_playvox
‪function do_player_or_npc_playvox(sound_to_play, category, subcategory)
Definition: _zm_audio.gsc:640
‪VOX_TABLE_COL_DELAYBEFOREPLAY
‪#define VOX_TABLE_COL_DELAYBEFOREPLAY
Definition: _zm_audio.gsh:7
‪get_number_variants
‪function get_number_variants(aliasPrefix)
Definition: _zm_spawner.gsc:1651
‪PERKSACOLA_STINGER
‪#define PERKSACOLA_STINGER
Definition: _zm_audio.gsh:38
‪ARRAY_ADD
‪#define ARRAY_ADD(__array, __item)
Definition: shared.gsh:304
‪CheckForValidMod
‪function CheckForValidMod(str_meansofdeath)
Definition: _zm_audio.gsc:1963
‪RANDOM_PLAYER
‪#define RANDOM_PLAYER
Definition: _zm_audio.gsc:1657
‪playState
‪function playState(state)
Definition: _zm_audio.gsc:1081
‪sndLocationShouldPlay
‪function sndLocationShouldPlay(array, activeZone)
Definition: _zm_audio.gsc:1220
‪sndMusicSystem_EEOverride
‪function sndMusicSystem_EEOverride(arg1, arg2)
Definition: _zm_audio.gsc:1279
‪is_headshot
‪function is_headshot(weapon, sHitLoc, sMeansOfDeath)
Definition: _zm_utility.gsc:5265
‪zombie_behind_vox
‪function zombie_behind_vox()
Definition: _zm_audio.gsc:152
‪RESPONSE_PERCENTAGE
‪#define RESPONSE_PERCENTAGE
Definition: _zm_audio.gsh:32
‪get_response_chance
‪function get_response_chance(event)
Definition: _zm_audio.gsc:334
‪oh_shit_vox
‪function oh_shit_vox()
Definition: _zm_audio.gsc:224
‪PLAYTYPE_NONE
‪#define PLAYTYPE_NONE
Definition: _zm_audio.gsh:41
‪REGISTER_SYSTEM
‪#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition: shared.gsh:204
‪CheckForValidWeapon
‪function CheckForValidWeapon(weapon)
Definition: _zm_audio.gsc:1981
‪setup_hero_rival
‪function setup_hero_rival(player, hero, rival, category, type)
Definition: _zm_audio.gsc:762
‪array
‪function filter array
Definition: array_shared.csc:16
‪loadPlayerVoiceCategories
‪function loadPlayerVoiceCategories(table)
Definition: _zm_audio.gsc:515
‪sndRadio_Override
‪function sndRadio_Override(arg1, arg2)
Definition: _zm_audio.gsc:1573
‪sndConversation_Init
‪function sndConversation_Init(name, specialEndon=undefined)
Definition: _zm_audio.gsc:1658
‪zmbVoxGetLineVariant
‪function zmbVoxGetLineVariant(prefix, suffix, force_variant)
Definition: _zm_audio.gsc:896
‪sndMusicSystem_CreateState
‪function sndMusicSystem_CreateState(state, stateName, playtype=PLAYTYPE_REJECT, delay=0)
Definition: _zm_audio.gsc:1020
‪sndLocationQueue
‪function sndLocationQueue(zone)
Definition: _zm_audio.gsc:1263
‪VOX_TABLE_COL_RESPONSE
‪#define VOX_TABLE_COL_RESPONSE
Definition: _zm_audio.gsh:6
‪sndConvoStopCurrentConversation
‪function sndConvoStopCurrentConversation()
Definition: _zm_audio.gsc:1743
‪zmbVoxCreate
‪function zmbVoxCreate()
Definition: _zm_audio.gsc:470
‪VOX_TABLE_COL_SUFFIX
‪#define VOX_TABLE_COL_SUFFIX
Definition: _zm_audio.gsh:4
‪shouldPlayerSpeak
‪function shouldPlayerSpeak(player, category, subcategory, percentage)
Definition: _zm_audio.gsc:835
‪areNearbySpeakersActive
‪function areNearbySpeakersActive(radius=1000)
Definition: _zm_audio.gsc:939
‪player_zombie_kill_vox
‪function player_zombie_kill_vox(hit_location, player, mod, zombie)
Definition: _zm_audio.gsc:306
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪ZOMBIE_ANNOUNCER_PREFIX
‪#define ZOMBIE_ANNOUNCER_PREFIX
Definition: _zm_audio.gsc:1294
‪getRandomCharacter
‪function getRandomCharacter(ignore)
Definition: _zm_audio.gsc:1783
‪is_explosive_damage
‪function is_explosive_damage(mod)
Definition: _zm_utility.gsc:5294
‪player_is_in_laststand
‪function player_is_in_laststand()
Definition: laststand_shared.gsc:18
‪exists
‪function exists(str_flag)
Definition: flag_shared.csc:43
‪sndConvoInterrupt
‪function sndConvoInterrupt()
Definition: _zm_audio.gsc:1818
‪sndMusicSystem_EEWait
‪function sndMusicSystem_EEWait(origin, state)
Definition: _zm_audio.gsc:1276
‪zmbVoxAdd
‪function zmbVoxAdd(category, subcategory, suffix, percentage, response, delayBeforePlayAgain=0)
Definition: _zm_audio.gsc:580
‪get_zombie_array
‪function get_zombie_array()
Definition: zombie_utility.gsc:2043
‪isVoxOnCooldown
‪function isVoxOnCooldown(player, category, subcategory)
Definition: _zm_audio.gsc:871
‪is_last_zombie
‪function is_last_zombie()
Definition: _zm_audio.gsc:1554
‪secretUse
‪function secretUse(notify_string, color, qualifier_func, arg1, arg2)
Definition: _zm_audio.gsc:1282
‪networkSafeReset
‪function networkSafeReset()
Definition: _zm_audio.gsc:1530
‪SetExertVoice
‪function SetExertVoice(exert_id)
Definition: _zm_audio.gsc:40
‪is_player
‪function is_player()
Definition: _zm_utility.gsc:65
‪get_current_zombie_count
‪function get_current_zombie_count()
Definition: zombie_utility.gsc:2018
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪CheckForValidAIType
‪function CheckForValidAIType(e_victim)
Definition: _zm_audio.gsc:1985
‪sndMusicSystem_Locations
‪function sndMusicSystem_Locations(locationArray)
Definition: _zm_audio.gsc:1189
‪zmbAIVox_PlayDeath
‪function zmbAIVox_PlayDeath()
Definition: _zm_audio.gsc:1490
‪create_and_play_dialog
‪function create_and_play_dialog(category, subcategory, force_variant)
Definition: _zm_audio.gsc:603
‪DEMPSEY_CHAR_INDEX_R
‪#define DEMPSEY_CHAR_INDEX_R
Definition: _zm_audio.gsh:23
‪musicState_Create
‪function musicState_Create(stateName, playType=PLAYTYPE_REJECT, musName1, musName2, musName3, musName4, musName5, musName6)
Definition: _zm_audio.gsc:991
‪on_connect
‪function on_connect()
Definition: _arena.gsc:20
‪PERKSACOLA_JINGLE
‪#define PERKSACOLA_JINGLE
Definition: _zm_audio.gsh:37
‪sndPlayerHitAlert
‪function sndPlayerHitAlert(e_victim, str_meansofdeath, e_inflictor, weapon)
Definition: _zm_audio.gsc:1927
‪playerExert
‪function playerExert(exert, notifywait=false)
Definition: _zm_audio.gsc:47
‪RESPONSE_LINE_MAX_DIST
‪#define RESPONSE_LINE_MAX_DIST
Definition: _zm_audio.gsh:29
‪PLAYTYPE_REJECT
‪#define PLAYTYPE_REJECT
Definition: _zm_audio.gsh:42
‪name
‪class GroundFx name
‪is_placeable_mine
‪function is_placeable_mine(weapon)
Definition: _zm_utility.gsc:4267
‪water_vox
‪function water_vox()
Definition: _zm_audio.gsc:1849
‪RESPOND_APPEND
‪#define RESPOND_APPEND
Definition: _zm_audio.gsh:12
‪isAnyoneTalking
‪function isAnyoneTalking()
Definition: _zm_audio.gsc:1806
‪zmbAIVox_AmbientDelay
‪function zmbAIVox_AmbientDelay()
Definition: _zm_audio.gsc:1518
‪WAIT_SERVER_FRAME
‪#define WAIT_SERVER_FRAME
Definition: shared.gsh:265