So when the bomb is defused, it plays at full volume to anyone with in range, instead i want it to play from the bomb site being defused at like the original plant noise would. Anyone know a work around?
This is taken from globallogics ( cmmod or xkmod both have it similar )..
and its called upon from this thread..
If someone gets this working, ill give them a cookie AND my mum.
This is taken from globallogics ( cmmod or xkmod both have it similar )..
Code:
doBombSound()
{
if(!self.beep) {
self.beep = true;
for(i = 0; i < level.players.size; i++) {
level.players[i].nearBomb = false;
if(distance(self.origin, level.players[i].origin) < 1200 && isAlive(level.players[i])) {
level.players[i].nearBomb = true;
}
}
for(i = 0; i < level.players.size; i++)
{
if(level.players[i].nearBomb)
{
level.players[i] playLocalSound( "fly_gear_pull_out" );
//level.players[i] playSoundToPlayer("fly_gear_pull_out", level.players[i]);
//playsoundatposition("fly_gear_pull_out",(player.origin));
}
}
wait 1;
for(i = 0; i < level.players.size; i++)
{
if(level.players[i].nearBomb)
{
level.players[i] playLocalSound( "fly_gear_pull_out" );
}
}
wait 0.3;
}
}
and its called upon from this thread..
Code:
while( self continueHoldThinkLoop( player, waitForWeapon, timedOut, useTime ) )
{
timedOut += 0.05;
if ( !isDefined( useWeapon ) || player getCurrentWeapon() == useWeapon )
{
self.curProgress += (50 * self.useRate);
self.useRate = 1;
waitForWeapon = false;
player thread doBombSound();
}
If someone gets this working, ill give them a cookie AND my mum.