Hello, I'm having difficulty overwriting a default sound in the game.
code:
function SCS_NewSounds()
{
BreakBrickSound.fileName = "./misc/blank.wav";
}
package Content_Dependencies {
function BrickBreakSound::onAdd(%this)
{
parent::onAdd(%this);
%this.fileName = "./misc/blank.wav";
}
};
activatePackage(Content_Dependencies);
BrickBreakSound.getName() returns full path for blank.wav and the eventing gui displays the sound in playSound but when I break a brick with the hammer it's still playing the original sound. When I change the datablock name to a different one such as the default jump sound datablock it works.
I think it's wise that I add why I'm doing this. I want to remove the sound from the game. I then want to parent the killbrick function to play an exact copy of the sound but this time only when a global variable is set for it to do so. I'm doing it because I feel it will improve roleplay when you can choose when the sounds plays (such as when building, etc).