Adding Custom Boss Music

Plananas

Terrarian
Been working on a small mod for me and a few friends and am completely stuck adding music to the boss.
This is the current line of code assigning the music to the boss:

Music = MusicLoader.GetMusicSlot("UltimateBoss/Assets/Sounds/BossMusic")

I can change it to a pre-existing terraria sound but not my own custom file. There are no errors when building this however the music doesn't play.
Any help would be greatly appreciated:)
 
Dunno much about TML-specific coding, but comparing with the code from a mod where custom music does work, I think your line should look like this:
Music = MusicLoader.GetMusicSlot(Mod, "UltimateBoss/Assets/Sounds/BossMusic")
 
Dunno much about TML-specific coding, but comparing with the code from a mod where custom music does work, I think your line should look like this:
Music = MusicLoader.GetMusicSlot(Mod, "UltimateBoss/Assets/Sounds/BossMusic")
Just tried that but for some reason there is still no audio :/
Tested the music out as a sound effect and the file loaded properly so its some kind of problem with the ID I think
 
Back
Top Bottom