| Author |
Topic: Global sound for doors...? |
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Saturday, Jan. 30, 2010 11:00 pm |
 |
I just finish a map where I've placed some doors but I just notice that the sound for those doors are global, not for the specified door, so you can hear it around the whole map, and is not what I want to. What I want is the door souond can be exactly at the place where the door is placed, not a global sound.
this is my .gsc file:
Code: main()
{
maps\mp\mp_wolfenstein_castle_fx::main();
maps\mp\_load::main();
maps\mp\mp_rain::main(); //<--- This Line calls rasta_cod2_rain script
ambientplay("ambient_mp_wolfenstein_castle");
setExpFog(0.0001, 0.55, 0.6, 0.55, 0);
// setCullFog(0, 16500, 0.55, 0.6, 0.55, 0);
game["allies"] = "russian";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["russian_soldiertype"] = "winterlight";
game["german_soldiertype"] = "winterlight";
setCvar("r_glowbloomintensity0", ".25");
setCvar("r_glowbloomintensity1", ".25");
setcvar("r_glowskybleedintensity0",".3");
thread basement_accesdoor_rotate();
thread gardhouse_door1_rotate();
thread gardhouse_door2_rotate();
thread bathroomdoor_rotate();
thread lab_door_rotate();
thread catacumb_door1_rotate();
thread cablecar1_function();
thread bath_d1_rotate();
thread bath_d2_rotate();
thread kitchendoor_a_rotate();
thread main2ndfloor_door1_rotate();
thread main2ndfloor_door2_rotate();
thread atticdoor_rotate();
}
basement_accesdoor_rotate()
{
basement_accesdoor = getent("basement_accesdoor", "targetname");
basement_accestrigger = getent("basement_accestrigger", "targetname");
while(1)
{
basement_accestrigger waittill("trigger");
basement_accesdoor rotateyaw(90, 1.5, 0.7, 0.7);
basement_accesdoor playsound ("fermer_porte");
basement_accestrigger waittill("trigger");
basement_accesdoor rotateyaw(-90, 1.5, 0.7, 0.7);
basement_accesdoor playsound ("fermer_porte");
}
}
gardhouse_door1_rotate()
{
gardhouse_door1 = getent("gardhouse_door1", "targetname");
gardhouse_trig1 = getent("gardhouse_trig1", "targetname");
while(1)
{
gardhouse_trig1 waittill("trigger");
gardhouse_door1 rotateyaw(-90, 1.5, 0.7, 0.7);
gardhouse_door1 playsound ("fermer_porte");
wait(3);
gardhouse_door1 rotateyaw(90, 1.5, 0.7, 0.7);
gardhouse_door1 playsound ("fermer_porte");
}
}
gardhouse_door2_rotate()
{
gardhouse_door2 = getent("gardhouse_door2", "targetname");
gardhouse_trig2 = getent("gardhouse_trig2", "targetname");
while(1)
{
gardhouse_trig2 waittill("trigger");
gardhouse_door2 rotateyaw(90, 1.5, 0.7, 0.7);
gardhouse_door2 playsound ("fermer_porte");
wait(3);
gardhouse_door2 rotateyaw(-90, 1.5, 0.7, 0.7);
gardhouse_door2 playsound ("fermer_porte");
}
}
bathroomdoor_rotate()
{
bathroomdoor = getent("bathroomdoor", "targetname");
bathroom_trigger = getent("bathroom_trigger", "targetname");
while(1)
{
bathroom_trigger waittill("trigger");
bathroomdoor rotateyaw(-90, 1.5, 0.7, 0.7);
bathroomdoor playsound ("fermer_porte");
wait(3);
bathroomdoor rotateyaw(90, 1.5, 0.7, 0.7);
bathroomdoor playsound ("fermer_porte");
}
}
lab_door_rotate()
{
lab_door = getent("lab_door", "targetname");
lab_trigger = getent("lab_trigger", "targetname");
while(1)
{
lab_trigger waittill("trigger");
lab_door rotateyaw(90, 1.5, 0.7, 0.7);
lab_door playsound ("fermer_porte");
lab_trigger waittill("trigger");
lab_door rotateyaw(-90, 1.5, 0.7, 0.7);
lab_door playsound ("fermer_porte");
}
}
catacumb_door1_rotate()
{
catacumb_door1 = getent("catacumb_door1", "targetname");
catacumb_door2 = getent("catacumb_door2", "targetname");
catacumb_trigger = getent("catacumb_trigger", "targetname");
while(1)
{
catacumb_trigger waittill("trigger");
catacumb_door1 rotateyaw(90, 1.5, 0.7, 0.7);
catacumb_door2 rotateyaw(-90, 1.5, 0.7, 0.7);
catacumb_door1 playsound("doorcreak");
wait(3);
catacumb_door1 rotateyaw(-90, 1.5, 0.7, 0.7);
catacumb_door2 rotateyaw(90, 1.5, 0.7, 0.7);
catacumb_door1 playsound("doorcreak");
}
}
cablecar1_function()
{
cablecar1 = getent("cablecar1", "targetname");
cc_control1 = getent("cc_control1", "targetname");
while(1)
{
cc_control1 waittill("trigger");
wait(1);
cablecar1 moveto((4732, -944, -714), 15);
cablecar1 playsound("wolf_cablecar");
cc_control1 waittill("trigger");
wait(1);
cablecar1 moveto((3480, -944, -269), 15);
cablecar1 playsound("wolf_cablecar");
}
}
bath_d1_rotate()
{
bath_d1 = getent("bath_d1", "targetname");
trig = getent("bath_trigger1", "targetname");
while(1)
{
trig waittill("trigger");
bath_d1 rotateyaw(90, 1.5, 0.7, 0.7);
bath_d1 playsound("dooropening1");
wait(3);
bath_d1 rotateyaw(-90, 1.5, 0.7, 0.7);
bath_d1 playsound("doorclosing1");
}
}
bath_d2_rotate()
{
bath_d2 = getent("bath_d2", "targetname");
trig = getent("bath_trigger2", "targetname");
while(1)
{
trig waittill("trigger");
bath_d2 rotateyaw(90, 1.5, 0.7, 0.7);
bath_d2 playsound("dooropening1");
wait(3);
bath_d2 rotateyaw(-90, 1.5, 0.7, 0.7);
bath_d2 playsound("doorclosing1");
}
}
kitchendoor_a_rotate()
{
door_a = getent("kitchendoor_a", "targetname");
door_b = getent("kitchendoor_b", "targetname");
trig = getent("kitchen_trigger", "targetname");
while(1)
{
trig waittill("trigger");
door_a rotateyaw(90, 1.5, 0.7, 0.7);
door_a playsound("doorcreak");
door_b rotateyaw(-90, 1.5, 0.7, 0.7);
wait(3);
door_a rotateyaw(-90, 1.5, 0.7, 0.7);
door_a playsound("doorclosing1");
door_b rotateyaw(90, 1.5, 0.7, 0.7);
}
}
main2ndfloor_door1_rotate()
{
door3 = getent("main2ndfloor_door1", "targetname");
trig = getent("main2ndfloor_trigger1", "targetname");
while(1)
{
trig waittill("trigger");
door3 rotateyaw(-90, 1.5, 0.7, 0.7);
door3 playsound("fermer_porte");
wait(3);
door3 rotateyaw(90, 1.5, 0.7, 0.7);
door3 playsound("fermer_porte");
}
}
main2ndfloor_door2_rotate()
{
door4 = getent("main2ndfloor_door2", "targetname");
trig = getent("main2ndfloor_trigger2", "targetname");
while(1)
{
trig waittill("trigger");
door4 rotateyaw(-90, 1.5, 0.7, 0.7);
door4 playsound("dooropening1");
wait(3);
door4 rotateyaw(90, 1.5, 0.7, 0.7);
door4 playsound("doorclosing1");
}
}
atticdoor_rotate()
{
atticdoor = getent("atticdoor", "targetname");
trig = getent("attictrigger", "targetname");
while(1)
{
trig waittill("trigger");
atticdoor rotateyaw(90, 1.5, 0.7, 0.7);
atticdoor playsound("dooropening1");
wait(3);
atticdoor rotateyaw(-90, 1.5, 0.7, 0.7);
atticdoor playsound("doorclosing1");
}
}
Also, as you notice, theres a cablecar with the same problem, you can hear it all around.
Can somebody help me to get the sounds at where belong?
Thanks !!!
|
 |
|
|
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
|
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
|
| DeekCiti |
 |
General Member Since: Mar 13, 2008 Posts: 1293 Last: Jul 9, 2016 [view latest posts] |
|
|
|
|
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Wednesday, Feb. 3, 2010 11:43 pm |
 |
DeekCiti writes...Quote: It smells like your sound is playing as Ambient, and not as an element OR your radius is too big. Look at your alias "fermer_porte" to find out what parameters the sound is using. Simply change it.
I'm not familiar with COD2 sounds, but I assume they use and alias and you can define how the player hears the sound by defining it as Ambient or some other Spec.
Simply don't use ambient, OR make sure there is a radius range the player can only hear this sound. I would check your local sound tutorials for COD2.
I dont know pretty much about sounds radius or stuff like that, thats why I'm asking here for help to complete my map and make sure it will work on server.
This is my .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
#Ambiance
ambient_mp_wolfenstein_castle,,ambient/amb_france01b.mp3,0.63,,,,,,,local,streamed,,looping,,mp_wolfenstein_castle
#Ambient Elements,,,,,,,,,,,,,,,,,,,,,
wolf_cablecar,,misc/cablecar.wav,0.85,0.95,element,0.8,1.2,500000,500000,auto,streamed,,,,mp_wolfenstein_castle,,,,,,,,
# Door sounds,,,,,,,,,,,,,,,,,,,,,,,
doorcreak,,misc/doorcreak.wav,1,1,foley,0.9,0.9,120,2500,auto,,,,,mp_wolfenstein_castle,,,
dooropening1,,misc/dooropening1.wav,1,1,foley,0.9,0.9,120,2500,auto,streamed,,,,,
doorclosing1,,misc/doorclosing1.wav,1,1,foley,0.9,0.9,120,2500,auto,streamed,,,,,
fermer_porte,,misc/fermer_porte.wav,1,1,foley,0.9,0.9,120,2500,auto,streamed,,,,,
Which of those values is the radio? maybe that will help.
or maybe I'm using the wrong code to call them in my .gsc file.
Thanks for respond. I will appreciate if you have something good to use. THX!!! |
 |
|
|
| DeekCiti |
 |
General Member Since: Mar 13, 2008 Posts: 1293 Last: Jul 9, 2016 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Thursday, Feb. 4, 2010 12:42 am |
 |
Like I said, I've never mapped for COD2, but it seems the Soundalias's are similar. What you need to look at is the " dist_min" and " dist_max".
I've edited all the door sounds an the cable car sound. The distance is measured in COD units, same as in editor. 1 unit is very close to 1 foot.
Try this instead, see if it helps. Compare my changes to your original, and understand why it works the way it does now.
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
#Ambiance,,,,,,,,,,,,,,,,,,,,,,,
ambient_mp_wolfenstein_castle,,ambient/amb_france01b.mp3,0.63,,,,,,,local,streamed,,looping,,mp_wolfenstein_castle,,,,,,,,
#Ambient Elements,,,,,,,,,,,,,,,,,,,,,,,
wolf_cablecar,,misc/cablecar.wav,0.85,0.95,element,0.8,1.2,7,800,auto,streamed,,,,mp_wolfenstein_castle,,,,,,,,
# Door sounds,,,,,,,,,,,,,,,,,,,,,,,
doorcreak,,misc/doorcreak.wav,1,1,foley,0.9,0.9,7,400,auto,,,,,mp_wolfenstein_castle,,,,,,,,
dooropening1,,misc/dooropening1.wav,1,1,foley,0.9,0.9,7,400,auto,streamed,,,,,,,,,,,,
doorclosing1,,misc/doorclosing1.wav,1,1,foley,0.9,0.9,7,400,auto,streamed,,,,,,,,,,,,
fermer_porte,,misc/fermer_porte.wav,1,1,foley,0.9,0.9,7,400,auto,streamed,,,,,,,,,,,,
|
 |
|
|
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Thursday, Feb. 4, 2010 05:45 pm |
 |
Thanks DeekCiti, it works on the doors. Only in the cablecar the sound is only on the trigger is. So, theres a control-room where you can activate the car and it move well and the sound is there, not on the whole map, thats ok, but when I activate it to return, I can't hear it, the sound is down there , where the other trigger is, So, I sent the car down, and I walk down too climb to the other control room and activate it from there and the sound is there but no up-there. Did make sense?.
Do I need to make the trigger more bigger? , or just increase the values in the csv file?. Or theres a way to make the sound travel with the cablecar?. Which is what I really want to.
Thanks for your help.!!! |
 |
|
|
| DeekCiti |
 |
General Member Since: Mar 13, 2008 Posts: 1293 Last: Jul 9, 2016 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Thursday, Feb. 4, 2010 06:02 pm |
 |
Yes, there is a way you can make it travel with the cable car.
There are a few things that are important.
1. The cable car needs an origin to play the sound from, this can be tricky to add. I believe This step is Optional though. Check below for help on doing that. Let's try it WITHOUT the origin brush First, unless you feel comfortable adding it.
2. The sound the cable car makes, needs to be short, and set to looping in the alias.
3. The script needs to define that the cable car needs to play the sound, not the trigger. It also needs to define to play a looping sound, then stop the looping sound when the cable car stops moving.
To get an origin into your cable car:
Quote: Draw a small brush, about the size of a script_origin. Texture it, the orange "origin" texture. I don't know where this texture is located in COD2 tools. Be very careful when doing this next step. Or you might have to redo your cable car in radiant.
Select the origin you just made FIRST. Then select ONE piece of your cable car, then right click the 2D window and say script>brushmodel.
If it works right, the whole cable car will suddenly be selected, and what you did was add an origin to your cable car brushmodel group (you added a new brush to the group), an origin brush so the sound can play from it. Now all you have to do is move the origin ONLY to a good spot in the cable car, (probably dead center, or close enough) where you want the sound to emit from. Make sense?
Things to do.
1. Post your cable car script. (So it can be edited.)
2. Edit your soundalias line for the cable car to set as looping.
Code: wolf_cablecar,,misc/cablecar.wav,0.85,0.95,element,0.8,1.2,500000,500000,auto,streamed,,looping,,mp_wolfenstein_castle,,,,,,,,
3. Edit the Sound of the cable car moving if needed. (Shorten it to 1-2 seconds if it is too long or if it sounds like crap currently while it loops.) ( OPTIONAL)
4. Add and Origin to the cable car. (Think it is Optional, though I would do it)
|
 |
|
|
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Thursday, Feb. 4, 2010 07:01 pm |
 |
I like how that sound, but I have to be honest that I understand just a bit, confuse me a little.
This is the cablecar script:
Code: cablecar1_function()
{
cablecar1 = getent("cablecar1", "targetname");
cc_control1 = getent("cc_control1", "targetname");
while(1)
{
cc_control1 waittill("trigger");
wait(1);
cablecar1 moveto((4732, -944, -714), 15);
cablecar1 playsound("wolf_cablecar");
cc_control1 waittill("trigger");
wait(1);
cablecar1 moveto((3480, -944, -269), 15);
cablecar1 playsound("wolf_cablecar");
}
}
cc_control1 is the tirgger, the sound is not from the trigger, maybe I've expressed bad.
Theres 6 triggers with the same name so I can activate the cablecar from the control room and from inside the cablecar, all of them are working fine. When the cablcar is in position 1, theres a trigger to cativate it from inside, when the cablecar goin to position 2, theres another trigger to activate it from inside to return.
So what we need is to make the cablecar sound it self while is travelling, maybe your idea works but I need to study well to understand what I'm doing.
Thanks for your help!!!
Check the script so you can tell what it needs. |
 |
|
|
| DeekCiti |
 |
General Member Since: Mar 13, 2008 Posts: 1293 Last: Jul 9, 2016 [view latest posts] |
|
|
|
|