Author Topic: Sounds not replacing as they should  (Read 905 times)

whyyyy
I dont see anything wrong with this script, theres no errors, either.
Trying to cut the default death sound out and replace it with a new one.
Code: [Select]
function addNewSounds()
{
    if(isFile("./Da_Death.wav"))
        deathSound.fileName = "./da_Death.wav";
}

addnewSounds();

   
package DefaultCut
{
    function deathSound::onAdd(%this)
    {
        parent::onAdd(%this);

        if(isFile("./Da_Death.wav"))
            %this.fileName = "./Da_Death.wav";
    }

};
activatePackage(defaultcut);

try making the path include the add-on


Why not just

DeathSound.delete();

datablock soundThing(DeathSound)
{
    coolBroPath = "Paththing";
};

That didnt seem to work either.
Code: [Select]
DeathSound.delete();

datablock AudioProfile(DeathSound)
{
filename = "./Da_Death.wav";
description = AudioClosest3d;
preload = false;
};

right?

That didnt seem to work either.
Code: [Select]
DeathSound.delete();

datablock AudioProfile(DeathSound)
{
filename = "./Da_Death.wav";
description = AudioClosest3d;
preload = false;
};

right?
Seems about right. Probably remove DeathSound.delete(); but I could be wrong.

Seems about right. Probably remove DeathSound.delete(); but I could be wrong.
Your wrong.

Code: [Select]
package customDeathSound
{
     function player::playDeathCry( %this )
     {
          serverPlay3D( yourDeathSoundProfile, %this.getHackPosition() );
     }
};

activatePackage( "customDeathSound" );