Sign in to follow this  
Followers 0
BosnianArmy

Help me to place a song in my map

18 posts in this topic

Hello there,

 

You are probaly thinking (noob, this is the easiest part for making a map). Well.. I followed exactly this tutorial-----> http://4x3-gaming.com/showthread.php?tid=86

 

I did everything what there is but I am getting this error: Couldn't play stream 'sound/\airplanes.mp3' from alias song1- Unable to open file

 
Like I said I did exactly what in the tutorial stands, I changed the song though (downloaded a new song). And yes I made a IWD file of course.. at the mod section and then in the mod folder (fnrp_deathrun1.2). Named the iwd mp_dr_stayhigh and there inside is a folder named sound and there inside is the song yes.
 
This is my csv file:
 
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,second?a?ryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage



song1,,airplanes.mp3,1,1,,,,1000000,,announcer,streamed,,,master,,,,,,,,,,,,,,

And this is my script for the gsc:

music()
{
    level waittill( "round_started" );
    
    wait 1;
    
    ambientPlay( "song1" );
}

And this little script code is for the Zone File:

sound,mp_dr_stayhigh,mp_dr_stayhigh,all_mp

I hope someone can help me :s..

0

Share this post


Link to post
Share on other sites

Put the iwd in usermaps/yourmapname/iwd here. The files inside your iwd is good though.

and your update zone file code isn't good.

And what's your csv called in soundalias? 

 

What I always do to prevent errors is just call everything the same lol. You should do the same. 

song1,,airplanes.mp3,1,1,,,,1000000,,announcer,streamed,,,master,,,,,,,,,,,,,,

Rename song1 to airplanes. 

 

as zonefile do sound,airplanes,,all_mp

 

Name your csv in soundalias also airplanes.csv

0

Share this post


Link to post
Share on other sites

Well, iMtroll tried to help me over teamviewer, he tried the exact same as he is used to do with his own maps and it didn't worked, he said my mod-tools might be a bit corrupted.

 

 

*NOTE*

 

I'm installing mod-tools again and I'll see if it then works. I will let you know here if it works correctly then or not.

 

*NOTE*

 

Reinstalled mod-tools and same problem but I'll try Pixel's option.

0

Share this post


Link to post
Share on other sites

Well, iMtroll tried to help me over teamviewer, he tried the exact same as he is used to do with his own maps and it didn't worked, he said my mod-tools might be a bit corrupted.

 

 

*NOTE*

 

I'm installing mod-tools again and I'll see if it then works. I will let you know here if it works correctly then or not.

My theory is, if your usermaps and mod folder are in "compatibility files" then it may be causing the problem. Compatibility files are stored in AppData. I reckon that's why mine doesn't work. http://gyazo.com/ee7d187d926a1afff2ad685fb11d9212

0

Share this post


Link to post
Share on other sites

My theory is, if your usermaps and mod folder are in "compatibility files" then it may be causing the problem. Compatibility files are stored in AppData. I reckon that's why mine doesn't work. http://gyazo.com/ee7d187d926a1afff2ad685fb11d9212

 

I think I know the problem.. Since I bought my laptop for school and for home I saved COD4 on my USB from my old pc and just paste it on my laptop and works perfect lol but I think thats the reason why it doesn't work.. Well lets try to install COD4 again :dave:.. and install modtools etc there.

0

Share this post


Link to post
Share on other sites

Reinstalled COD4.. and mod-tools but nope! still nothing

 

But I'm wondering now, the tutorial from staab and then the script, this one:

music()
{
        wait 10;
        random = randomint (3);
        switch (random)
        {
                case 0: Ambientplay("airplanes");
                                iprintln("^7Now Playing^1:^7 B.O.B - Airplanes feat Hayley Williams - Feint DnB remix");
                                wait 1.0;
                                iprintln("^7Now Playing^1:^7 B.O.B - Airplanes feat Hayley Williams - Feint DnB remix");
                                wait 1.0;
                                iprintln("^7Now Playing^1:^7 B.O.B - Airplanes feat Hayley Williams - Feint DnB remix");
                                break;
        }
}

Do you need to thread it? Because I thread it.

 

 

*NOTE*

 

Tried without and with threading it, now the error is gone and ain't getting nothing now, what the fk is happening?..

0

Share this post


Link to post
Share on other sites

YES YOU MUST THREAD THE MUSIC SCRIPT BOSNIAN, as it isn't in the main function 

 

This was what I wrote, follow this way, yes i added the part about the iwd

 

Ok, So I'll write it out, Here's the method I use. 

 

First: get your mp3, and name it something short but so you can remind yourself of what the song is, E.g song is dubstep? name it dub

 

Second: get your MP3 and place it in cod4 > Raw > Sound > Music (if you don't have a music folder make one)

 

 

9098c00887e775769ca3c6c8eb198cbb.png

 

Third: Go into your Raw > Soundalias Folder and get any csv and copy and paste it into the sound alias folder and name it to what your song is called Eg: dub.csv, Then, Open it up and put this code in it:

Spoiler 
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,seconda​ryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage


dub,,music/dub.mp3,0.7,0.7,ambience,,,,,ambient,streamed,,looping,,all_mp,,,,,,

 

Third Add this to your update zone file in compile tools: 

 

sound,dub,,all_mp

 

The only music script I have is a random music script, so you might be able to change it to your liking

 

 

Music()
{
wait 10;
random = randomint (3);
switch (random)
{
case 0: Ambientplay("who");
iprintln("^7Now Playing^1:^7 Iniquity ^1- ^7Who I Am");
wait 1.0;
iprintln("^7Now Playing^1:^7 Iniquity ^1- ^7Who I am");
wait 1.0;
iprintln("^7Now Playing^1:^7 Iniquity ^1- ^7Who I Am");
break;
case 1: Ambientplay("happy");
iprintln("^7Now Playing^1:^7 Kid Cudi ^1- ^7Pursuit Of Happnies (Steve Aoki Dance Remix)");
wait 1.0;
iprintln("^7Now Playing^1:^7 Kid Cudi ^1- ^7Pursuit Of Happnies (Steve Aoki Dance Remix)");
wait 1.0;
iprintln("^7Now Playing^1:^7 Kid Cudi ^1- ^7Pursuit Of Happnies (Steve Aoki Dance Remix)");
break;
case 2: Ambientplay("fair");
iprintln("^7Now Playing^1:^7 Gramatik ^1- ^7While I Was Playin Fair");
wait 1.0;
iprintln("^7Now Playing^1:^7 Gramatik ^1- ^7While I Was Playin Fair");
wait 1.0;
iprintln("^7Now Playing^1:^7 Gramatik ^1- ^7While I Was Playin' Fair");
break;
}
}

 

 

 

Just remember to change everything that has DUB to what ever your song is called. Should work. if it doesn't, reply back 

 

Then make an iwd named your map mp_dr_mapname.iwd make a sound folder, then a music folder inside that and put your song in there, but making sure its still in the music folder inside raw then put the iwd in the MOD THAT YOU TEST THE MAP WITH  

 

^thats what I missed out when I was helping before, if it doesn't work, idk why

 

also, there was 1 thing wrong with this script, there was a mistake raindomint use this

music()
{
        wait 10;
        random = randomint (1);
        switch (random)
        {
                case 0: Ambientplay("airplanes");
                                iprintln("^7Now Playing^1:^7 B.O.B - Airplanes feat Hayley Williams - Feint DnB remix");
                                wait 1.0;
                                iprintln("^7Now Playing^1:^7 B.O.B - Airplanes feat Hayley Williams - Feint DnB remix");
                                wait 1.0;
                                iprintln("^7Now Playing^1:^7 B.O.B - Airplanes feat Hayley Williams - Feint DnB remix");
                                break;
        }
}
0

Share this post


Link to post
Share on other sites

#Staab and #Triton, tried to help me over teamviewer and they did both what they could do and no result >: (...

0

Share this post


Link to post
Share on other sites

Staab's tutorial should've worked as that explains how to do everything and it works for me. I do not know what to tell you, all I can say is try restarting the entire process on a different map and see if that works. I have had a problem before where one of the maps I was making just didn't play music, but on a different map it did.

 

 

Make sure everything matches up perfectly within scripts and aliases, along with the song name.

 

Make sure you named your csv mp_dr_stayhigh as that's what you're calling in the zone files.

 

Unfortunately if everything matches up I do not know what to tell you.

 

*EDIT* Make sure you make your iwd mp_dr_stayhigh.iwd and not mp_dr_stayhigh.iwd.zip as that is a very common mistake.

0

Share this post


Link to post
Share on other sites

PROBLEM HAS BEEN SOLVED BY ROBIN

---------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

What the problem was, is the tutorials from Sentrex & Staab >: (.. I bet there is a error in the soundaliases/music script. Because Robin's method works 100%.

 

What you need to do is make a csv file for the soundaliases named (the mine is stayhigh_main and stayhigh_bitch) in RAW/SOUNDALIASES.

 

 

The code for soundaliases is:

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,secon?d?a?ryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage



stayhigh_bitch,,music/stayhigh_bitch.mp3,1,1,ambience,,,,,ambient,streamed,,looping,,all_mp,,,,,,

And then the music script in your map .gsc, this one is for randoms:

thread music();


music()
{
	rand = randomInt(2);//When you want for example 4 random songs, make from number 2 to a number 4
	
	if(rand == 0) //random song 1
		ambientPlay("stayhigh_bitch");
	else if(rand == 1) //random song 2
		ambientPlay("stayhigh_main");
	//else if(rand == 2) Random song 3 
		//ambientPlay("stayhigh_main");
	//else if(rand == 3) random song 4
	//	ambientPlay("stayhigh_main");
}

And the last step is to put this in your "Update Zone Files":

sound,stayhigh_main,,all_mp
sound,stayhigh_bitch,,all_mp


//Note:

If you want 4 different songs you need 4 different of these, for example:

sound,stayhigh_song1,,all_mp
sound,stayhigh_song2,,all_mp
sound,stayhigh_song3,,all_mp
sound,stayhigh_song4,,all_mp

And the last stap is, make a IWD file named mp_dr_yourmapname and make a folder inside there named sound and inside the folder sound make a folder named music. And in the music folder place there the song.

 

And done! this is alot easier then the tutorial from Staab and Sentrex.. and without any errors aswell.

 

 

 

 

Thank you Robin! and thanks aswell to Triton/Staab/Sentrex for helping me trough xfire/teamviewer, srry but Robin's method works.

0

Share this post


Link to post
Share on other sites

Isn't that just exactly the same as everyone elses? ^^

 

EDIT: The only difference i see is that you added these two to the zone file and renamed Your original csv to stayhigh_main and made a seperate csv, But if that works then good on you!

sound,stayhigh_main,,all_mp

sound,stayhigh_bitch,,all_mp

0

Share this post


Link to post
Share on other sites

Pls Bosnian, mine and Staabs work for everyone except you. Which leads me to believe you're not doing it correctly, to blame us for it not working is ridiculous.

At least the problem is fixed now

Don't be expecting too much help from me in the future.

0

Share this post


Link to post
Share on other sites

Pls Bosnian, mine and Staabs work for everyone except you. Which leads me to believe you're not doing it correctly, to blame us for it not working is ridiculous.

At least the problem is fixed now

Don't be expecting too much help from me in the future.

 

 

I'm sure more people got the same problem because Robin had the same problem. Triton tried litteraly everything what he got to fix it but nope it didn't worked. And why being such a dick now with this sentence? "Don't be expecting too much help from me in the future." #Sentrex

0

Share this post


Link to post
Share on other sites

Sentrex, I have to say. I was on my laptop and I needed music in my map. I followed staab's tutorial and had the same problem as bosnian. couldnt open file stream or something. When that didn't work, I turned my computer on and copied, edited the music files that I used on imaginary. That were the ones Bosnian showed. And then it worked for me aswell. I rlly think there is an error in the csv. 3 people with the exact same error in 2 days isnt a coincidence. And last but not least. I don't get why people in every tutorial say that you have to put the .mp3 in raw/sound/music/yoursongname.mp3. I've never done that, and had no problems with it so far.

0

Share this post


Link to post
Share on other sites

Isn't that just exactly the same as everyone elses? ^^

 

EDIT: The only difference i see is that you added these two to the zone file and renamed Your original csv to stayhigh_main and made a seperate csv, But if that works then good on you!

sound,stayhigh_main,,all_mp

sound,stayhigh_bitch,,all_mp

 

You need to make of course more then 1 csv for your song. 

 

So it will be:

 

stayhigh_main.csv

stayhigh_bitch.csv

 

etc etc

0

Share this post


Link to post
Share on other sites

I've told many people before to do it the exact same way, also I never actually gave out a template csv?

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0