Want to add some mp3's to the maps try this I added it to Train to Hell map funny as hell.
Code:
STEP 1.) Edit "local.master aliascache" for the mp3's file you want to use,then add this to the ubersound.scr or to map script, (see example below)
if you are adding it to the ubersound.scr you don't need to add "local.master = spawn ScriptMaster". If you are adding it to
a single player map, then you need to add the map.scr name to "loaded maps "dm obj" ( example loaded maps "dm obj m1l2 m2l4" )
You can edit the sound parameters.
( soundparms parameters are: <BaseVolume> <RandVolume> <BasePitch> <randPitch> <minDist> <maxDist> <Channel> <Loaded/Streamed> )
aliascache song_1 mp3/crazytrain.mp3 soundparms 2.5 1.0 1.0 0.0 2000 20000 weaponidle loaded maps "dm obj"
STEP 2.) Edit the coord's for speaker and triggers in the script below for the map script you want to use.
STEP 3.) Edit the "play" thread for the amount of songs you want it to play, and the "wait" time ( see "wait 480" in below example)
for the longest song to play, this will prevent players from stopping and starting songs over and over again.
STEP 4.) Make a musci folder in mohaa/mian and put the mp3's in t.
// ========== Train To hell =========
//===================================
// ===== copy & paste under main or in the ubersound.scr =====
local.master = spawn ScriptMaster
local.master aliascache song_1 music/crazytrain.mp3 soundparms 6.5 1.0 1.0 0.0 2000 20000 weaponidle loaded maps "dm obj"
// ===== copy & paste under level waittill prespawn =====
thread mp3
//===== copy & paste at in of map.scr
mp3:
level.song = 1
local.speaker = spawn script_model model "models/static/speakerbox1.tik" targetname "speaker"
local.speaker.origin = ( -2513.03 -4460.87 150.24 )
local.speaker.angles = ( 0 -90 0 )
local.speaker notsolid
local.speaker light 1 0 0 25
local.trig = spawn trigger_use targetname "music"
local.trig.origin = ( -2513.03 -4460.87 150.24 )
local.trig setsize ( -30 -30 -30 ) (30 30 30 )
local.trig setthread play
local.trig message "Song List: 1.War 2.warPigs 3.Stranglehold 4.Free-For-All"
local.trig wait 5
local.trig delay 0
end
play:
$music waittill trigger
if(level.song > 1) //Max number or songs you want played
level.song = 0 // Sets back to first song after the last one has been reached
local.song = ("song_" + level.song) //sound alias song_1, song_2, song_3, etc
$music stopsound 3 //5, local 3, weaponidle Sound channel we are using
waitframe
$music playsound local.song
level.song ++ //prep for next song, increment level.song by one
$music delete
wait 480
thread mp3
end