mp3 mind telling me what are the others?????do you wanna use midi or mp3/ogg/aiff
local audio = audio_stream_load("AUDIO_FILENAME.mp3")
function on_warp()
audio_stream_play(audio, true, 1)
end
hook_event(HOOK_ON_WARP, on_warp)
In your mods root folder, create a text file. Post the following in that text file:how to i put this code in is there some application i need to install or????
Save that file as "main.lua". You don't need another program. Any basic text editor should work.create a sound folder in your mod's folder, put the mp3 audio file in it and use this code (you will need to change it to fit what you need):
LUA:local audio = audio_stream_load("AUDIO_FILENAME.mp3") function on_warp() audio_stream_play(audio, true, 1) end hook_event(HOOK_ON_WARP, on_warp)
hey can you make it so that it replaces the main audio? Because you can hear it, but you can also the hear still hear the slider theme in Peaches Secret Slide along with it, for example.In your mods root folder, create a text file. Post the following in that text file:
Save that file as "main.lua". You don't need another program. Any basic text editor should work.
yeah, here's the code:hey can you make it so that it replaces the main audio? Because you can hear it, but you can also the hear still hear the slider theme in Peaches Secret Slide along with it, for example.
local audio = audio_stream_load("audio file.ogg")
function on_warp()
if gNetworkPlayers[0].currLevelNum == LEVEL_LEVELNAME then
stop_background_music(get_current_background_music())
audio_stream_set_looping(audio, true)
audio_stream_play(audio, true, 1)
else
audio_stream_play(audio, true, 0)
end
end
hook_event(HOOK_ON_WARP, on_warp)
audio file.ogg
and LEVEL_LEVELNAME
to level you want to replace the music, for example LEVEL_BOWSER2
or LEVEL_JRB
How i can add 2 or more music?yeah, here's the code:
LUA:local audio = audio_stream_load("audio file.ogg") function on_warp() if gNetworkPlayers[0].currLevelNum == LEVEL_LEVELNAME then stop_background_music(get_current_background_music()) audio_stream_set_looping(audio, true) audio_stream_play(audio, true, 1) else audio_stream_play(audio, true, 0) end end hook_event(HOOK_ON_WARP, on_warp)
make sure to changeaudio file.ogg
andLEVEL_LEVELNAME
to level you want to replace the music, for exampleLEVEL_BOWSER2
orLEVEL_JRB
local audio = audio_stream_load("audio file.ogg")
function on_warp()
if gNetworkPlayers[0].currLevelNum == LEVEL_LEVELNAME then
stop_background_music(get_current_background_music())
audio_stream_set_looping(audio, true)
audio_stream_play(audio, true, 1)
else
audio_stream_play(audio, true, 0)
end
end
hook_event(HOOK_ON_WARP, on_warp)
Oh thanks. But how i can add the music in castle main floor or castle grounds?you copy these parts:LUA:local audio = audio_stream_load("audio file.ogg")
LUA:function on_warp() if gNetworkPlayers[0].currLevelNum == LEVEL_LEVELNAME then stop_background_music(get_current_background_music()) audio_stream_set_looping(audio, true) audio_stream_play(audio, true, 1) else audio_stream_play(audio, true, 0) end end
but now you change the "audio", "audio file.ogg", "on_warp", "LEVEL_LEVELNAME"LUA:hook_event(HOOK_ON_WARP, on_warp)
same thing, all playable areas have a level id, in your case that would beOh thanks. But how i can add the music in castle main floor or castle grounds?
Thanks brosame thing, all playable areas have a level id, in your case that would be
LEVEL_CASTLE
and LEVEL_CASTLE_GROUNDS respectivly.
its LEVEL_BOWSER_1, not LEVEL_BOWSER1. Same with the other bowser stagesBut when i do LEVEL_BOWSER1, 2 or 3 and i enter to the fight the music doesn't work. Wath i can do?
Oh these have sense thanks so much for allits LEVEL_BOWSER_1, not LEVEL_BOWSER1. Same with the other bowser stages