Author Topic: how to add custom death sounds  (Read 789 times)

??? how i do it THANKS if you help forget YOU if you dont

as a server-wide script thing or as a playertype thing


Something like this should work.

Code: [Select]
datablock AudioProfile( sfxDeath0 )
{
    fileName = "./death0.wav";
    description = audioClosest3d;
   
    preload = false;
};

datablock AudioProfile( sfxDeath1 )
{
    fileName = "./death1.wav";
    description = audioClosest3d;
   
    preload = false;
};

package CustomDeathSounds
{
    function player::playDeathCry( %obj )
    {
        %obj.playAudio( 0, "sfxDeath" @ getRandom( 0, 1 ) );
    }
};
activatePackage( CustomDeathSounds );