1 #using scripts\shared\util_shared;
3 #insert scripts\shared\shared.gsh;
9 org =
Spawn(
"script_origin", ( 0, 0, 0 ) );
10 if( isdefined( ender ) )
16 org PlayLoopSound( alias );
22 self waittill( ender );
38 org =
Spawn(
"script_origin", ( 0, 0, 1 ) );
40 if( !isdefined( origin ) )
45 org PlaySoundWithNotify( alias,
"sounddone" );
46 org waittill(
"sounddone" );
48 if( isdefined( org ) )
68 org =
Spawn(
"script_origin", ( 0, 0, 0 ) );
70 if ( !isdefined( bStopSoundOnDeath ) )
72 bStopSoundOnDeath =
true;
74 if ( bStopSoundOnDeath )
78 if( isdefined( tag ) )
80 org LinkTo(
self, tag, ( 0, 0, 0 ), ( 0, 0, 0 ) );
84 org.origin =
self.origin;
85 org.angles =
self.angles;
89 org PlayLoopSound( alias );
91 self waittill(
"stop sound" + alias );
92 org StopLoopSound( alias );
116 org =
Spawn(
"script_origin", ( 0, 0, 0 ) );
117 org endon(
"death" );
120 if ( isdefined( tag ) )
122 org.origin =
self GetTagOrigin( tag );
123 org LinkTo(
self, tag, ( 0, 0, 0 ), ( 0, 0, 0 ) );
127 org.origin =
self.origin;
128 org.angles =
self.angles;
132 org PlaySoundWithNotify( alias,
"sounddone" );
134 if ( isdefined( ends_on_death ) )
136 assert( ends_on_death,
"ends_on_death must be true or undefined" );
146 org waittill(
"sounddone" );
168 self endon(
"death" );
169 org waittill(
"sounddone" );
184 self notify(
"stop sound" + alias );
200 org =
Spawn(
"script_origin", ( 0, 0, 0 ) );
201 org endon(
"death" );
203 if( isdefined( offset ) )
205 org.origin =
self.origin + offset;
206 org.angles =
self.angles;
211 org.origin =
self.origin;
212 org.angles =
self.angles;
216 org PlayLoopSound( alias );
218 self waittill(
"stop sound" + alias );
219 org StopLoopSound( 0.1 );
225 org =
Spawn(
"script_origin",(0,0,1));
227 if(!isdefined(origin))
229 origin =
self.origin;
233 org PlayLoopSound(alias);
235 level waittill(ender);
244 ent endon(
"death" );
245 self waittill(
"death" );
246 if( isdefined( ent ) )
259 assert( isdefined( level.players ) );
261 if ( level.splitscreen )
263 if ( isdefined( level.players[0] ) )
264 level.players[0] PlayLocalSound(sound);
268 if ( isdefined( team ) )
270 for ( i = 0; i < level.players.size; i++ )
272 player = level.players[i];
273 if ( isdefined( player.pers[
"team"] ) && (player.pers[
"team"] == team))
274 player PlayLocalSound(sound);
279 for ( i = 0; i < level.players.size; i++ )
280 level.players[i] PlayLocalSound(sound);