Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 29 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Ambient sound problems
ArmorMaster
General Member
Since: Mar 30, 2005
Posts: 371
Last: Oct 3, 2009
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Friday, Mar. 20, 2009 04:59 am
Hello everyone, I'm having problems getting my ambient sound to work. The name of my map is "armor" (without the quotations).
Here's what I got:

My map's .gsc file (armor.gsc)
Code:

#include maps\_utility;

#include common_scripts\utility;

#include maps\_anim;


main()
{

precacheString(&"ARMOR_INTROSCREEN_LINE_1");
precacheString(&"ARMOR_INTROSCREEN_LINE_2");
precacheString(&"ARMOR_INTROSCREEN_LINE_3");
precacheString(&"ARMOR_INTROSCREEN_LINE_4");
precacheString(&"ARMOR_OBJ1");
precacheString(&"ARMOR_OBJ2");

maps\_load::main();

ambientPlay("ambient_armor");

level.player takeallweapons();
level.player giveWeapon( "colt45" );
level.player giveWeapon( "m4_grenadier" );
level.player giveMaxAmmo( "m4_grenadier" );
level.player giveWeapon( "fraggrenade" );
level.player giveWeapon( "flash_grenade" );///15
level.player switchtoWeapon( "m4_grenadier" );
level.player setOffhandSecondaryClass( "flash" );
level.vasquez = getEnt ( "vasquez", "targetname" );
level.vasquez thread magic_bullet_shield();
level.miller = getEnt ( "miller", "targetname" );
level.miller thread magic_bullet_shield();
level.johnson = getEnt ( "johnson", "targetname" );
level.johnson thread magic_bullet_shield();
level.weaponClipModels = [];///24
level.weaponClipModels[0] = "weapon_dragunov_clip";
level.weaponClipModels[1] = "weapon_ak47_clip";
level.weaponClipModels[2] = "weapon_g3_clip";
level.weaponClipModels[3] = "weapon_ak74u_clip";
level.weaponClipModels[4] = "weapon_m16_clip";
level.weaponClipModels[5] = "weapon_saw_clip";


thread slidedoor_slider ();

thread slidedoor_slider2 ();

thread start_intro();

obj1(); 

}
slidedoor_slider()
{
slidedoor=getent("locked_in","targetname");
trig=getent("locked_in_trigger","targetname");
while(1)
{
trig waittill ("trigger");
slidedoor movez (-260,0.000000001,0,0);

}
}

obj1()

{

obj1 = getent("obj1", "targetname"); 

enemy = getEntArray( "arab_1", "targetname" );  

objective_add(1, "active", &"ARMOR_OBJ1",getent("obj1",
"targetname").origin);

objective_current(1);

iprintlnbold (&"ARMOR_OBJECTIVES"); 

obj1 waittill("trigger"); 

waittill_dead_or_dying( enemy );

objective_state(1, "done"); 

obj1 delete(); 

///wait(30);

thread obj2(); 

}

obj2()

{

obj2 = getent("obj2", "targetname"); 

objective_add(2, "active", &"ARMOR_OBJ2",getent("obj2",
"targetname").origin);

objective_current(2);

iprintlnbold (&"ARMOR_OBJECTIVES"); 

obj2 waittill("trigger");

wait(30); 

objective_state(2, "done"); 

obj2 delete(); 

}
slidedoor_slider2()
{
slidedoor=getent("roof_trap","targetname");
trig=getent("obj1","targetname");
while(1)
{
trig waittill ("trigger");
slidedoor movey (253,0.000000001,0,0);

wait(30);

slidedoor delete(); 

}
}

start_intro()
{	
level.player setorigin( level.player.origin );
level.player setplayerangles( level.player.angles );
level.player freezeControls( true );
level.player allowsprint( false );
thread introscreen();
} 

introscreen()
{
level.intro_offset = ( -20 );
lines = [];
level.player freezeControls( true );
level.player allowsprint( false );
lines[ lines.size ] = &"ARMOR_INTROSCREEN_LINE_1";
lines[ "date" ] = &"ARMOR_INTROSCREEN_LINE_2";
lines[ lines.size ] = &"ARMOR_INTROSCREEN_LINE_3";
lines[ lines.size ] = &"ARMOR_INTROSCREEN_LINE_4";
maps\_introscreen::introscreen_feed_lines( lines );
	
level.intro_offset = ( 0 );
fade_time = ( 8 );
time = ( 8.5 );
maps\_introscreen::introscreen_generic_fade_in( "black", time, fade_time );
wait (2);
level.player freezeControls( false );
level.player allowsprint( true );
	
}



My maps .csv file:

Code:

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,center percentage,platform,envelop_min,envelop_max,envelop percentage,conversion

null,,null.wav,,,,,,,,,,,,,,,,,,,,,,,,,,,

#Misc,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

ambient_armor,,armor_sound/amb_middle_east2v7_lsrs.mp3,0.25,0.25,ambience,,,,,ambient,streamed,,looping,,armor,,,,,,amb_rear,nowetlevel fulldrylevel,0.3,,,,,,mp3



I have a .iwd file in the main folder with the sound file I want in it, it is: armor.iwd>sounds>armor_sound>amb_middle_east2v7_lsrs.mp3

In my zone file I got the line:

rawfile,sound/armor_sound/amb_middle_east2v7_lsrs.mp3




I've made sure the fast file is updated, but it shouldn't matter because it's a .mp3 file and it's in it's own .iwd file.

When I run the map I get this error:

unknown sound alias 'ambient_armor'

And the error was called from my .gsc file (line 17)

Is there some fundamental thing I'm doing wrong here? I've made sure I didn't type it wrong or misspell anything, I'm not sure what the problem is, can anybody spot anything? Thanks for your time![wave]
Share |
voidsource
General Member
Since: May 5, 2007
Posts: 1513
Last: Sep 1, 2013
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Friday, Mar. 20, 2009 05:34 am
post a screen shot if you can.
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Friday, Mar. 20, 2009 07:34 am
Add this line to your Zone file:

sound,armor,!all_sp

Tell the map you want to use your soundalias.

Right now, as far as I can see, the map has no idea you have a soundalias.csv.

It reads this line: (17)

ambientPlay("ambient_armor");

and says... I don't know what alias "ambient_armor" is [confused]

so it returns with:
unknown sound alias 'ambient_armor'

I'm not sure the proper way to write this line for an SP map.
I've seen it written 3 different ways, but the way your alias is set up, I think that will work.


Maybe someone who does SP maps can point you in the right direction, the correct way to write that line. It matters what you have in your "loadspec" column in your alias to what the line should say.

But, I'm pretty sure it can't see your soundalias, unless I'm not seeing something else?
Share |
jeannotvb
General Member
Since: Dec 8, 2007
Posts: 620
Last: Feb 1, 2010
[view latest posts]
Level 6
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Friday, Mar. 20, 2009 09:31 am
I get the same error shown as red text on the bottom left on my map, only shows up when I do map_restart though (the mp3 works fine though).

I can't really see the problem..
Share |
ArmorMaster
General Member
Since: Mar 30, 2005
Posts: 371
Last: Oct 3, 2009
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Friday, Mar. 20, 2009 06:14 pm
Thanks for all your help guys, but still no luck. I put the

sound,armor,!all_sp

in my zone file and still nothing. I'm not sure what else needs to be done but to recap I got:

1) ambientPlay("ambient_armor");
in my map's .gsc file

2) a .csv file in the soundaliases folder with a sound alias "ambient_armor"

3) a .iwd file containing the .mp3 file in sound>armor_sound (the "armor_sound" folder is listed in the .csv file in the "ambient_armor" line)

4) sound,armor,!all_sp
is listed in my zone file

I'm not aware of anything else I need to put in there, and my fast file is updated too. I'm still getting the same error:

unknown sound alias 'ambient_armor'

Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Friday, Mar. 20, 2009 06:43 pm
First of all, if you are using an mp3, you have to put that iwd that has it in there, in the mods folder you run when you run the map.

If the mp3 already exists in the games iwd's then use it there, don't make a whole new iwd to run it. Find its path and note it in the csv. Since the file already exists in the game (iw_08), and you haven't altered the mp3 in any way then use this line instead to save yourself a headache.

Code:
ambient_armor,,ambient/amb_middle_east2v7_lsrs.mp3,0.25,0.25,ambience,,,,,ambient,streamed,,looping,,armor,,,,,,,,,,,,,


Second, you've got some extra junk in your csv that you don't need.

Just have it simply say: (if you have altered your mp3) use this line:

Code:
ambient_armor,,armor_sound/amb_middle_east2v7_lsrs.mp3,0.25,0.25,ambience,,,,,ambient,streamed,,looping,,armor,,,,,,,,,,,,,

My guess is you haven't altered the mp3 in any way, you just pulled it from the game and put it in an iwd to use as your ambient play. Which can work, but why not make it simple and run it from the game to start with. If you haven't altered it, use the first code box with the original path of that mp3 the game uses. [crazy]

Also, change your Zone file line to this instead of what I first posted:

sound,armor,armor,!all_sp

Share |
ArmorMaster
General Member
Since: Mar 30, 2005
Posts: 371
Last: Oct 3, 2009
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Saturday, Mar. 21, 2009 01:21 am
Thank you man, it works great! For the record, so future mappers can actually get worth from the search function, here's what you need to have ambient sound (specifically for a sp map):


1) ambientPlay("ambient_yourmapname");
in your map's .gsc file

2) a .csv file in the soundaliases folder with a sound alias line of

Code:


ambient_yourmapname,,ambient/soundfilename.mp3,0.25,0.25,ambience,,,,,ambient,streamed,,looping,,yourmapname,,,,,,,,,,,,,




3) sound,armor,armor,!all_sp

is listed in my zone file



And that should do it. Thanks to all the guys here, especially DeekCiti for getting this going. Thanks![wave]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»