PDA

View Full Version : HOW TO:Add random music to costum Map



djukel
2nd Dec 06, 5:52 AM
I wrote a small SCAR file that can be attached to any usermade map in order to listen (random) music.




function OnGameSetup()
Rule_AddOneShot(music, 0)
end

function music()
local rand = World_GetRand(1,4)
if rand == 1 then
Util_PlayMusic("SOUND/Music/creditstheme", 0, 0)
elseif rand == 2 then
Util_PlayMusic("SOUND/Music/longroad_to_mortar", 0, 0)
elseif rand == 3 then
Util_PlayMusic("SOUND/Music/genericmissionmusic", 0, 0)
elseif rand == 4 then
Util_PlayMusic("SOUND/Music/enterthesqarecombat", 0, 0)
end
end



You should make a file called mapname.scar and copy these line into it.

Henry666
3rd Dec 06, 12:36 AM
Cool, will try this out

nsysusoloman
6th Feb 07, 6:13 PM
Do those music have to be in-game music?

Or can I add Michael Jackson's music as well?

vkarr
7th Jun 10, 9:41 AM
"Do those music have to be in-game music?

Or can I add Michael Jackson's music as well?"

yes you can brother, just conver you michael jackson to smf, and dont forget to edit the bsc. :)

Playmobill
2nd Jul 10, 12:05 PM
"SOUND/Music/enterthesqarecombat"
is there any 'u' missing in 'sqUare', or does the music is named like that ?

Thanks for the tut man, it will add some ambiance ;)

sirpsychoj
2nd Jul 10, 10:17 PM
It may or may not be Playmobil, unfortunately Relics files have alot of spelling mistakes in them, so it may be correct if the original is a typo