Announcement

Collapse
No announcement yet.

Firesound volume and radius

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Firesound volume and radius

    I want to make my modded sniper rifle louder and be heard from further away.

    I've looked into the TransientSoundVoulme and TransientSoundRadius properties, but changing those doesn't seem to have an effect.

    What exactly does those properties change and how do I make my gun louder?

    Thx.

    #2
    ++BUMP++

    Okay, I've actually gotten the sound volume working so I can tweak it:

    Code:
    var()   float           FireSoundVolume;
    var()   float           FireSoundRadius;
    Declared those variables, then updated the PlayFiring function to use my new variable:

    Code:
    function PlayFiring()
    {
    	Weapon.PlayAnim(FireAnims[Rand(3)], FireAnimRate, TweenTime);
        Weapon.PlayOwnedSound(FireSound,SLOT_Interact,FireSoundVolume,,,Default.FireAnimRate/FireAnimRate,false);
        ClientPlayForceFeedback(FireForce);
        FireCount++;
    }
    And of course, adding these to default properties:

    FireSoundVolume=+600.0
    FireSoundRadius=+1000.0

    Now I can tweak the volume to my liking.

    Now I'm trying to make the SoundRadius tweakable too, but simply adding it to the function...

    Weapon.PlayOwnedSound(FireSound,SLOT_Interact,Fire SoundVolume,FireSoundRadius,,,Default.FireAnimRate/FireAnimRate,false);

    Gets me a compile error.

    Thx to anyone who can help.

    Comment


      #3
      Ehm.. ever bothered to just set WeaponFire.TransientSoundVolume and WeaponFire.TransientSoundRadius instead of Weapon?

      Comment


        #4
        Yeah, I tryed that already but it didn't work. Now I think I know why though, those variables wern't declared in the FireClass of the weapon.

        Lines like...

        var() float TransientSoundVolume;
        var() float TransientSoundRadius;

        probably would have enabled those settings.

        Anyways, after digging through the base WeaponFire code, I got this working line in the playfiring function:

        Code:
        Weapon.PlayOwnedSound(FireSound,SLOT_Interact,FireSoundVolume,,FireSoundRadius,Default.FireAnimRate/FireAnimRate,false);

        Comment

        Working...
        X