Announcement

Collapse
No announcement yet.

Stoping a sound

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

    Stoping a sound

    Hi

    OK this is the story. I have made a deemer when the user is in alt fire mode he/she can right click and it plays a dramatic war loop using PlaySound(). This is fine but if someone starts the loop and then the deemer blows up the loop will continue to play at the blow up location until it finnishes. I want it to stop as soon as the deemer explodes. Anyone have the knowlege to help.

    Thanks
    John.

    #2
    Set the sound to none or the volume to 0, or play the 'deemer explosion sound in the same channel.

    Comment


      #3
      I have tried setting the sound to none and playing explosion sound on the same channel with no luch. Ho do I change the volume of a playing sound. I can see nothing in the sound class. Here is the code for the warhead

      Code:
      class VelWarhead extends RedeemerWarhead;
      
      #exec AUDIO IMPORT FILE="sounds\horn.wav" NAME="horn" GROUP="HS"
      var float curTime;
      
      replication
      {
      	reliable if( Role<ROLE_Authority )
      		PS;
      }
      
      function AltFire( optional float F )
      {
      	if(curTime < Level.TimeSeconds)
      	{
      		curTime = Level.TimeSeconds + 6.23;
      		PS();	
      	}
      }
      
      function PS()
      {
      	PlaySound(Sound'HS.horn', SLOT_Misc, 4.0, false, 300.0);
      }
      
      
      function BlowUp(vector HitLocation)
      {
      	PlaySound(Sound'HS.horn', SLOT_Misc, 0.0);
      	super.BlowUp(HitLocation);
      }
      
      
      DefaultProperties
      {
      	curTime = -1;
      }

      Comment


        #4
        Check out the Hellbender twinbeam. It stops playing the charged sound loop when it fires.

        Comment

        Working...
        X