Everything had the varied pain sounds.
Give it a shot
Think I will. Thanks!
functions that possibly play the sound:
function Player::playDeathCry(){} - you can overwrite this to play different sounds even based on the datablock
i don’t remember if there’s a pain sound function but if there is it’s most likely the same thing you can do with it, if not you can make it so the sound is blank on a datablock and package damage function (shapebase)
The pain..er...
code (not a code guy) that folks have been using for custom pain sounds is this:
useCustomPainEffects = true;
painSound = PainSound;
JumpSound = JumpSound;
deathSound = DeathSound;
Not sure how this works or why, but with those three, you can implement any sounds you want for pain, jumping, and death. I was wondering if it would've been possible to make it so that it plays one of three pain sounds at random. Kind of like what Jaydee did here:
function MG42Projectile::onCollision(%this, %obj, %col, %fade, %pos, %normal)
{
Parent::onCollision(%this, %obj, %col, %fade, %pos, %normal);
%random = getRandom(1,3);
switch(%random)
{
case 1:
serverplay3d(impact1HitSound,%pos);
case 2:
serverplay3d(impact2HitSound,%pos);
case 3:
serverplay3d(impact3HitSound,%pos);
default:
echo("Error on MG42");
}
}
That enables each bullet to make one of three sounds at random whenever it hits. (Not that I need to explain that to you since you can read this stuff like I read comics. I'm just stating it so that you know that I know what it does.) I was wondering if I could do this same thing with the...painSound...code. Would it be as easy as adding something like this after the equal sign? Cause that would be right up my alley in terms of what I'm actually able to do. It would also...apparently...be the first playertype that plays varied pain sounds in the history of blockland. I think. I've not come across a single playertype or bot that has varied pain sounds or death sounds, which is either indicative of how easy it would be, or how impossible it would be.