Author Topic: Making a music Datablock with code?  (Read 449 times)

For a sound effect it would be...
Code: [Select]
datablock AudioProfile(Beep_Popdown_Sound)
{
filename = "./Beep_Popdown.wav";
description = AudioClosest3d;
preload = false;
};
How would you make a music datablock in this way?

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

Thanks!

Final Code:
Code: [Select]
datablock AudioProfile(musicData_Bass_4) {
   fileName = "Add-Ons/Music/Bass_1.ogg";
   description = "AudioMusicLooping3d";
   preload = "1";
   uiName = "Bass_Chog";
};