## XIII
Class TriggerSound

source: C:\XIII\XIII\Classes\TriggerSound.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Triggers
             |
             +--XIII.TriggerSound

Direct Known Subclasses:None

class TriggerSound
extends Engine.Triggers

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Variables
`Actor` | `SoundActor`
`bool` | `bTriggerOnlyOnce`
`sound` | `hTriggeredMusic`
`sound` | `hTriggeredSound`

Function Summary
`void` | `Trigger(Actor Other, Pawn EventInstigator)`
    //_____________________________________________________________________________

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class TriggerSound extends Triggers;
    00005
    00006	var() sound hTriggeredMusic;
    00007	var() sound hTriggeredSound;
    00008	var() bool bTriggerOnlyOnce;
    00009	var() actor SoundActor;
    00010
    00011	//_____________________________________________________________________________
    00012	function Trigger( actor Other, pawn EventInstigator )
    00013	{
    00014	    if ( hTriggeredSound != none )
    00015		{
    00016			if(SoundActor==none)
    00017			{
    00018				PlaySound( hTriggeredSound );
    00019			}
    00020			else
    00021			{
    00022				SoundActor.PlaySound( hTriggeredSound );
    00023			}
    00024
    00025		}
    00026	    if ( hTriggeredMusic != none )
    00027	      PlayMusic(hTriggeredMusic);
    00028	    if (bTriggerOnlyOnce)
    00029	      //Destroy();
    00030		  disable('trigger');
    00031	}
    00032
    00033
    00034
    00035	defaultproperties
    00036	{
    00037	     bBlockZeroExtentTraces=False
    00038	     bBlockNonZeroExtentTraces=False
    00039	}

End Source Code