Blockland Forums > Modification Help
Change Chest Sounds?
Pages: (1/1)
Rocket Launcher:
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".
Tendon:
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: ---datablock AudioProfile(partyhorn_Sound)
{
filename = "./partyhorn.wav";
description = AudioClosest3d;
preload = false;
};
--- End code ---
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
Rocket Launcher:
--- Quote from: Tendon on February 04, 2018, 12:11:08 PM ---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: ---datablock AudioProfile(partyhorn_Sound)
{
filename = "./partyhorn.wav";
description = AudioClosest3d;
preload = false;
};
--- End code ---
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
--- End quote ---
Thanks, this works perfectly. Topic locked.
Pages: (1/1)