• 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound volume?
#1
Is it possible to change the sound volume?

like:
Code:
playSoundInSpace( sound, location )
{
    org = spawn( "script_origin", location );
    org.origin = location;
    org playSound( sound );

    foreach(player in level.players)
    {
        afstand = distance(location, player.origin);
        switch(afstand)
        {
        case <10:
            sound.volume = 100;
            break;
        case <30:
            sound.volume = 60;
            break;
        case <50:
            sound.volume = 25;
            break;
        case <70:
            sound.volume = 10;
        break;
        case >70:
            sound.volume = 0;
        break;
        }
    }
    
    wait 5;
    org delete();
}

is this possible?
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

  Reply
#2
it was in cod4 o.o, but it must work in mw2
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply
#3
(04-10-2011, 12:23)Se7en Wrote: it was in cod4 o.o, but it must work in mw2

Correction,
It's not possible to change the sound volume in MW2...
As Se7en said, It was possible in COD4 since you could edit .csv files... (Example, soundalias.csv)
That's how you could create custom sound too Tongue
  Reply
#4
(04-11-2011, 18:59)Rendflex Wrote:
(04-10-2011, 12:23)Se7en Wrote: it was in cod4 o.o, but it must work in mw2

Correction,
It's not possible to change the sound volume in MW2...
As Se7en said, It was possible in COD4 since you could edit .csv files... (Example, soundalias.csv)
That's how you could create custom sound too Tongue

But on Scrapyard there is an object that makes sound.. which you can hear if you are close to it, otherwise its silent
But i cannot find mp_boneyard.gsc and the other mapfiles =.=
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

  Reply
#5
(04-11-2011, 19:08)iAegle Wrote:
(04-11-2011, 18:59)Rendflex Wrote:
(04-10-2011, 12:23)Se7en Wrote: it was in cod4 o.o, but it must work in mw2

Correction,
It's not possible to change the sound volume in MW2...
As Se7en said, It was possible in COD4 since you could edit .csv files... (Example, soundalias.csv)
That's how you could create custom sound too Tongue

But on Scrapyard there is an object that makes sound.. which you can hear if you are close to it, otherwise its silent
But i cannot find mp_boneyard.gsc and the other mapfiles =.=

Ehrm, that's in game xD
If you spawn some model, and add some sound to it
like...
modelname playlooplsound("soundalias");
You will notice that the sound volume changes based on distance... :3
  Reply
#6
place an entity in the air and let it play the sound. place higher for more silence.
  Reply
#7
(04-13-2011, 15:58)SuperNovaAO Wrote: place an entity in the air and let it play the sound. place higher for more silence.

Not sure why its not working .. Sad
Well i just use:
Code:
    foreach(player in level.players)
    {
        if(distance(location, player.origin) < 500)
            player playLocalSound("oldschool_return");
    }
for now
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Music [Release] [C#] [LIBRARY] SABSFile library (open sound files) JariZ 31 8,299 07-07-2013, 17:20
Last Post: Red-EyeX32
Music unlimited breath scope+sound when walking aim LE3* 0 826 04-21-2013, 08:42
Last Post: LE3*
  Black Ops II Sound Stuffs master131 1 2,141 01-18-2013, 20:30
Last Post: Pepper26
  [Request] exporting sound inside black ops tomglazer 2 963 12-10-2012, 23:30
Last Post: tomglazer
  Help i have sound file for blac ops pap12322221112 2 832 10-22-2012, 08:08
Last Post: d0h!
  [Request] Rankup sound on kill hillbilly 12 1,935 09-16-2012, 11:08
Last Post: Ich1994
  Tom Bo Sound Tool TwoPumpChump 15 3,163 08-25-2012, 03:08
Last Post: Nekochan
  SOUND Mod by JayDi [Z00MBY] Alex 15 2,515 07-26-2012, 00:07
Last Post: Kasperle
  SP sounds never work (included my sound test mod here) Xzite 7 1,700 04-05-2012, 17:47
Last Post: Xzite
  Help Effects editor & sound list Lemon 14 2,840 04-04-2012, 22:24
Last Post: rotceh_dnih

Forum Jump:


Users browsing this thread: 1 Guest(s)