Custom sound in a square room not to spill out.
Posted: March 5th, 2012, 4:55 am
Hello, I have a map with several rooms in and I would like to have sound to fill them but not spill out. I have got some sounds working elsewhere just as looping sounds based on a radius from x,y,z co-ordinates.
Now I am trying to get a sound to play in a room without spilling out the walls yet still reaching the corners - I can not do this with the radius method.
I have been trying for about 10 hours and just can't get anywhere - I was thinking that a Trgger_multiple that filled the room and some sort of object (script origin or model or a non-colliding caulk brush ) for the sound to be anchored to would work but no matter what I do it wont work.
I have one script that does nothing yet if I change the song name to one I haven't got then the game will say it can't find it when I am in the trigger. I guess from this that the script is calling the song but I can not hear it.
I have just commented out the bits I have tried with no luck but left them there just in case. In radiant Ihave tried both script_origin and scipt_model with the targetnames of 'SOUND_ORIGIN' and a trigger_multiple with the targetname of SOUND_TRIGGER my mp3 is 7th_dimension and it works fine when called like maps\mp\_fx::loopSound("7th_dimension",(1024,1024,472),1);
Any help would be great - it is now 04:00 and I am tearing my hair out due to lack of sleep so giving up on it for tonight but will check back here periodically to see if there is any advice.
Thank you for reading..
Now I am trying to get a sound to play in a room without spilling out the walls yet still reaching the corners - I can not do this with the radius method.
I have been trying for about 10 hours and just can't get anywhere - I was thinking that a Trgger_multiple that filled the room and some sort of object (script origin or model or a non-colliding caulk brush ) for the sound to be anchored to would work but no matter what I do it wont work.
I have one script that does nothing yet if I change the song name to one I haven't got then the game will say it can't find it when I am in the trigger. I guess from this that the script is calling the song but I can not hear it.
Code: Select all
main()
{
thread globalSoundFx();
thread test_sound1();
}
globalSoundFx()
{
maps\mp\_fx::loopSound("7th_dimension",(1024,1024,472),1);
maps\mp\_fx::loopSound("coventry_carol",(1899,1553,364),1);
// maps\mp\_fx::loopSound("7th_dimension",("sound_origin"),1);
}
test_sound1()
{
orig = getent("sound_origin","targetname");
trig = getent("sound_trigger","targetname");
for (;;)
{
trig waittill("trigger",player);
orig playsoundtoplayer("7th_dimension",player);
wait(3);
}
}
//test_sound1()
// {
// orig = getent ("sound_origin","targetname");
// trig = getent ("sound_trigger","targetname");
// while(1)
// {
// trig waittill ("trigger");
// orig playsound("7th_dimension");
// wait(5);
// }
// }
Any help would be great - it is now 04:00 and I am tearing my hair out due to lack of sleep so giving up on it for tonight but will check back here periodically to see if there is any advice.
Thank you for reading..