Blockland Forums > Modification Help
Making a music Datablock with code?
(1/1)
Reinforcements:
For a sound effect it would be...

--- Code: ---datablock AudioProfile(Beep_Popdown_Sound)
{
filename = "./Beep_Popdown.wav";
description = AudioClosest3d;
preload = false;
};

--- End code ---
How would you make a music datablock in this way?
Kalphiter:

--- Code: ---new AudioProfile(musicData_Bass_1) {
   fileName = "Add-Ons/Music/Bass_1.ogg";
   description = "AudioMusicLooping3d";
   preload = "1";
   uiName = "Bass 1";
};
--- End code ---
No guarantees that it will be selectable in-game.
Reinforcements:
Thanks!

Final Code:

--- Code: ---datablock AudioProfile(musicData_Bass_4) {
   fileName = "Add-Ons/Music/Bass_1.ogg";
   description = "AudioMusicLooping3d";
   preload = "1";
   uiName = "Bass_Chog";
};
--- End code ---
Navigation
Message Index

Go to full version