Author Topic: Removing bot spawn sounds and spawn emitter  (Read 1055 times)

Hey I was hoping someone could help me out in removing the sound and emitter from a bot_hole when it respawns. I remember seeing a post somewhere on forums about this specific topic but can't seem to find it anywhere. Any help would be appreciated, thanks!

It's embedded into the code (Add-ons/Bot_Hole/holes.cs), function fxDTSBrick::spawnHoleBot( %obj ) is the one that creates the sound %player.scheduleNoQuota(10,spawnProjectile,"audio2d","spawnProjectile","0 0 0", 1);
By reading it, there may not be another way other than rewriting the function.

You might be able to do something similar to what I did with my silent wrench. Changing the name of the sound, running the function, and then changing the name of the sound back to what it should be.

Code: [Select]
function SilentWrenchImage::onFire(%data, %player, %slot)
{
WrenchHitSound.setName(WrenchHitSound_Temp);
WrenchMissSound.setName(WrenchMissSound_Temp);

WrenchImage.onFire(%player, %slot);

WrenchHitSound_Temp.setName(WrenchHitSound);
WrenchMissSound_Temp.setName(WrenchMissSound);
}

He could package the spawn hole bot function and make the projectile's sound not play anything, now that I think of it

Thanks for the responses, i'll be sure to try these out when I get home.

While Jes' solution will work, it sounds like it could cause problems.
I personally would take the packaging solution over the sound name change solution.
But how much trouble could those mere microseconds of name change cause anyway? :/