Remaking the "How to add music to your map" tutorial.

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
nobody.
CJ Wannabe
CJ Wannabe
Posts: 2
Joined: September 8th, 2014, 3:32 pm
Location: Slovenia

Remaking the "How to add music to your map" tutorial.

Post by nobody. » September 8th, 2014, 4:09 pm

You will need :

3 Folders (soundaliases, sound & maps)
Sound folder will include another folder called ambient which will contain your .mp3 file.
While the soundaliases folder will contain your mp_mapname.csv that we're going to make later in this tutorial.

So, now that's been said, we can begin.

1. Create a new text file, copy the code below in there and edit it as it's shown in the example below.

Code: Select all

name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage

#Ambience,,,,,,,,,,,,,,,
sound_name,,sound_path.mp3,0.95,,,,,,,local,streamed,,looping,,map_name
For example :

Code: Select all

song1,,ambient/song1.mp3,0.95,,,,,,,local,streamed,,looping,,dr_tropical
2. Save the file as mp_yourmapname.csv, in my case it would be dr_tropical.csv and put it in your soundaliases folder.

3. Pick a song that you like and cut it if you want (Audacity), and rename it to your sound_name, in my case song1.

4. Copy the song into sound/ambient and that's it for this part.
For the scripting part you will need your mp_mapname.gsc in maps/mp and just add AmbientPlay("sound_name"); to main().

Code: Select all

main()
{
	maps\mp\_load::main();
	//Game Shits
		game["allies"] = "american";
		game["axis"] = "german";
		game["attackers"] = "allies";
		game["defenders"] = "axis";
		game["american_soldiertype"] = "normandy";
		game["german_soldiertype"] = "normandy";	
		AmbientPlay("sound_name");
	//Cvars
		setcvar("r_glowbloomintensity0",".25");
		setcvar("r_glowbloomintensity1",".25");
		setcvar("r_glowskybleedintensity0",".5");
	//Threads
		thread trap1();
		thread trap2();
		thread trap3();
		thread trap4();
		thread trap5();

}
In the end, just copy everything in your mp_mapname.iwd and voila, there you have it.
That's it for this tutorial, if you have any questions,post them below. ~nobody.

nobody.
CJ Wannabe
CJ Wannabe
Posts: 2
Joined: September 8th, 2014, 3:32 pm
Location: Slovenia

Re: Remaking the "How to add music to your map" tutorial.

Post by nobody. » September 8th, 2014, 6:38 pm

geez this messed up the site layout haha o.o

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Remaking the "How to add music to your map" tutorial.

Post by Pedsdude » September 8th, 2014, 8:43 pm

Yep, it'll be the lack of spaces in the code :P
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests