Page 1 of 2
Custom BackGround Music
Posted: Sun Sep 21, 2003 9:37 pm
by BiG_HeaD
What Kind of Music should the file type be? Does moh play mp3. or wav?
I dont get any of the tutorials.
Anybody help me?
Posted: Sun Sep 21, 2003 11:36 pm
by CorporalPunishment
Wav files are quite large so you will probably want to use MP3
You need to make a .mus file
In your main map script add this before "level waittill spawn"
exec global/ambient.scr YourMapName
Make a "YourMapName.mus" in the music folder.
Have a look in the music folder in you pak files for examples
Lastly a MP3 needs to be in a folder not in a Pak. So to distribute
your map you need to have the folder seperate.
Posted: Sun Sep 21, 2003 11:54 pm
by BiG_HeaD
Okay, instead of finding a mp3, i found a Good Ambient one inside the AMbient folder. So, How do i take that file and turn it into a .mus
?
Posted: Mon Sep 22, 2003 5:03 am
by CorporalPunishment
Have a look in the music folder (Pak0.pk3) and find a .mus file that uses the mp3 you want.
then copy it and rename it as youmapname.mus
go into your map script and add:
exec global/ambient.scr YourMapName
level waittill spawn
Posted: Tue Sep 23, 2003 2:25 am
by BiG_HeaD
u win
ty
Posted: Tue Sep 23, 2003 8:59 am
by Jack Ruby
Ok, I will post here seeing as its on the same topic.
I am adapting the Berlin TOW script for my own nefarious purposes, to get the level ending music I have to refer to level.music = Berlin ( something like that, the ambient background to this Berlin is planes flying over, bombs, general war sounds, then it switches tracks when either team wins for the cinematic ending.
Soo I want the ambience to be obj_team2 ( V2 ), I can remove the berlin line in the script and play the V2 ambience but then I lose the music for the endings, I cant find what that level.music thing refers to, anyone know how to get the ambience I want and the level end music ?
Cheers.
Posted: Wed Sep 24, 2003 4:36 pm
by BiG_HeaD
okay, i found the .mus file i want. I added the required .scr to the original. Now, when i put together the .pk3, where should the .mus file go?
Posted: Wed Sep 24, 2003 5:07 pm
by The Jackal
SPEARHEAD
Mainta/ Music/ my_map.mus
Allied Assault
Main/ my_map.pk3/ Music/ my_music.mus
Naturally you are calling this .MUS file from your map script.
i.e.
Code: Select all
exec global/ambient.scr my_map.mus
That's it! ROCK on.
Posted: Wed Sep 24, 2003 5:37 pm
by BiG_HeaD
hum?
//PrisonCamp1
//ARCHITECTURE: BiG_HeaD
//SCRIPTING: BiG_HeaD
main:
//set scoreboard messages
setcvar "g_obj_Alliedtext1" "DIE"
setcvar "g_obj_Alliedtext2" ""
setcvar "g_obj_Alliedtext3" ""
setcvar "g_obj_Axistext1" ""
setcvar "g_obj_Axistext2" ""
setcvar "g_obj_Axistext3" ""
setcvar "g_scoreboardpic" "none"
exec global/ambient.scr prisoncamp1.mus
level waitTill prespawn
//***precache Dm stuff
exec global/DMprecache.scr
level.script=maps/dm/prisoncamp1.scr
level waittil spawn
end
I made the .pk3 with one folder with maps-dm-bsp-lin-min-scr
other folder: music-prisoncamp1.mus
??!?!
Posted: Wed Sep 24, 2003 6:37 pm
by jv_map
exec global/ambient.scr prisoncamp1.mus
should be
exec global/ambient.scr prisoncamp1
(only works when your .mus file is in the main/music folder!)
Posted: Wed Sep 24, 2003 6:48 pm
by The Jackal
First off you need to fix that script.
1.
level waitTill prespawn
Should be:
2.
level waittil spawn
Should be:
3.
level.script=maps/dm/prisoncamp1.scr
Should be:
Code: Select all
level.script = maps/dm/prisoncamp1.scr
4.
exec global/ambient.scr prisoncamp1.mus
Should be:
Code: Select all
exec global/ambient.scr prisoncamp1
The rest seems OK.
Posted: Wed Sep 24, 2003 8:12 pm
by jv_map
All true, except the third point (which is a useless line anyway, you could just omit it all together

)
Posted: Wed Sep 24, 2003 8:13 pm
by BiG_HeaD
works. thanx.
Posted: Wed Sep 24, 2003 9:02 pm
by The Jackal
Really. I read someplace that you have to set level script from within the map script file.
It puzzled me as to why. But who am I to complain?
Taken from Spearhead:
level.script = maps/dm/MP_Malta_DM.scr
I just came up with an answer that that satisfied my curiousity and stuck with it.
Basically you set level.script so that while ingame, you can use the editscript command and it knows what script file to open. Makes sense?
Posted: Wed Sep 24, 2003 9:25 pm
by The Jackal
BUZZZZ! I WAS WRONG!
I tried switching the level script to the drukk map script. Then went to game and tried EDITSCRIPT command and it opened the Malta script still.
Hmmm. Can this really be usless? I even saw it in the Basic Scripts.doc.