Author Topic: randomized pain sounds  (Read 1515 times)

seeing that we have the randomized death sounds, ( http://forum.blockland.us/index.php?topic=233366.0 ) it seems awfully odd that randomized pain sounds were not included.

i'm pretty sure it won't take long to make.
« Last Edit: July 01, 2013, 08:43:00 AM by MunkeyCheez »

I would do it if somebody gives me some sounds to work with.

I would do it if somebody gives me some sounds to work with.
i've got some sounds lol

I have made pain noises (bone cracking) while it does the original pain nosie, but I wasn't sure to release it though.




Code: [Select]
datablock AudioProfile(randomPainSound1)
{
    ...
};

datablock AudioProfile(randomPainSound2)
{
    ...
};

package randomPainSounds
{
    function player::playPain(%this)
    {
        serverPlay3D("randomPainSound" @ getRandom(1, 2), %this.getHackPosition());
    }
};

activatePackage(randomPainSounds);

Here you go.
https://dl.dropboxusercontent.com/u/19324878/Sound_RandomPain.zip

I also used the death sounds which were included in the folder you gave me so to avoid issues I wouldn't have Sound_DeathYells enabled when you have this enabled and vice versa.

Code: [Select]
function Armor::Damage(%this,%obj,%sourceObject,%position,%damage,%damageType)
{
if(%obj.client.getClassName() $= "GameConnection")
{
if(!%client.justdied)
{
if(%damage > 0)
%obj.client.player.PlayRandomPain();
}
}
return Parent::Damage(%this,%obj,%sourceObject,%position,%damage,%damageType);
}

function GameConnection::onDeath(%client)
{
%client.justdied = 1;
%client.player.PlayRandomDeath();
return Parent::onDeath(%client);
}

function GameConnection::spawnPlayer(%client)
{
%client.justdied = 0;
return Parent::spawnPlayer(%client);
}

What's this? You don't define Player::playRandomPain anywhere, and you've already modified Player::playPain to play random pain sounds anyway.

Code: [Select]
function Armor::Damage(%this,%obj,%sourceObject,%position,%damage,%damageType)
{
if(%obj.client.getClassName() $= "GameConnection")
{
if(!%client.justdied)
{
if(%damage > 0)
%obj.client.player.PlayRandomPain();
}
}
return Parent::Damage(%this,%obj,%sourceObject,%position,%damage,%damageType);
}

function GameConnection::onDeath(%client)
{
%client.justdied = 1;
%client.player.PlayRandomDeath();
return Parent::onDeath(%client);
}

function GameConnection::spawnPlayer(%client)
{
%client.justdied = 0;
return Parent::spawnPlayer(%client);
}

What's this? You don't define Player::playRandomPain anywhere, and you've already modified Player::playPain to play random pain sounds anyway.
Oh stuff, I forgot about that, I had it set as PlayRandomPain before I realised I could just overwrite the default function, I'll fix it now.

Edit: That's everything fixed now. Sorry about the silly mistake.
« Last Edit: July 03, 2013, 08:36:26 AM by Danny Boy »

thank you very much :)

release to rtb?

thank you very much :)

release to rtb?
I might later I guess, I'll probably add an RTB pref for enabling/disabling and maybe even one so you can select one of the other voices you gave me.

I might later I guess, I'll probably add an RTB pref for enabling/disabling and maybe even one so you can select one of the other voices you gave me.
excellent!