4 .float voicescript_index;
5 .float voicescript_nextthink;
6 .float voicescript_voiceend;
8 void target_voicescript_clear(
entity pl)
10 pl.voicescript =
NULL;
15 if(actor.voicescript !=
this)
17 actor.voicescript =
this;
18 actor.voicescript_index = 0;
19 actor.voicescript_nextthink =
time + this.
delay;
23 void target_voicescript_next(
entity pl)
38 if(
time >= pl.voicescript_voiceend)
40 if(
time >= pl.voicescript_nextthink)
45 if(pl.voicescript_index < vs.cnt)
46 i = pl.voicescript_index * 2;
47 else if(n > vs.cnt * 2)
48 i = ((pl.voicescript_index - vs.cnt) % ((n - vs.cnt * 2 - 1) / 2)) * 2 + vs.cnt * 2 + 1;
54 play2(pl,
strcat(vs.netname,
"/",
argv(i),
".wav"));
58 pl.voicescript_voiceend =
time + dt;
59 pl.voicescript_nextthink = pl.voicescript_voiceend + vs.wait * (0.5 +
random());
63 pl.voicescript_voiceend =
time - dt;
64 pl.voicescript_nextthink = pl.voicescript_voiceend;
67 pl.voicescript_index += 1;
71 pl.voicescript =
NULL;
88 this.
use = target_voicescript_use;
92 for(i = 0; i+1 < n; i += 2)
spawnfunc(info_player_attacker)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))