Author Topic: Change Chest Sounds?  (Read 1126 times)

I know this is a dumb question, but what do I need to do in order to change the default Treasure Chest's sound that plays when opening it? I'm already at the area showing the code to add the event, I just don't know how to change the sound. Any contribution helps, thanks.

Also, the sound I wish to have played is "Clapping.wav".

If you don't plan on releasing this, You could extract the treasure chest, modify it, then repackage it.
Then set it to read-only so blockland doesn't overwrite it when the launcher starts. :P

To add a new sound, you'll want code like this:
Code: [Select]
datablock AudioProfile(partyhorn_Sound)
{
filename = "./partyhorn.wav";
description = AudioClosest3d;
preload = false;
};

And then you could change line35 to:
   %par1        = partyhorn_Sound.getId();


A better option would be to package up brickTreasureChestData::onPlant(%data, %obj)
but I don't want to explain that

If you don't plan on releasing this, You could extract the treasure chest, modify it, then repackage it.
Then set it to read-only so blockland doesn't overwrite it when the launcher starts. :P

To add a new sound, you'll want code like this:
Code: [Select]
datablock AudioProfile(partyhorn_Sound)
{
filename = "./partyhorn.wav";
description = AudioClosest3d;
preload = false;
};
And then you could change line35 to:
   %par1        = partyhorn_Sound.getId();


A better option would be to package up brickTreasureChestData::onPlant(%data, %obj)
but I don't want to explain that
Thanks, this works perfectly. Topic locked.