home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / Gameplay / Classes / ACTION_PlayAmbientSound.uc < prev    next >
Text File  |  2003-12-11  |  719b  |  33 lines

  1. class ACTION_PlayAmbientSound extends ScriptedAction;
  2.  
  3. var(Action)        sound    AmbientSound;
  4. var(Action)        byte    SoundVolume;
  5. var(Action)        byte    SoundPitch;
  6. var(Action)        float    SoundRadius;
  7.  
  8. function bool InitActionFor(ScriptedController C)
  9. {
  10.     // play appropriate sound
  11.     if ( AmbientSound != None )
  12.     {
  13.         C.SequenceScript.AmbientSound = AmbientSound;
  14.         C.SequenceScript.SoundVolume = SoundVolume;
  15.         C.SequenceScript.SoundPitch = SoundPitch;
  16.         C.SequenceScript.SoundRadius = SoundRadius;
  17.     }
  18.     return false;    
  19. }
  20.  
  21. function string GetActionString()
  22. {
  23.     return ActionString@AmbientSound;
  24. }
  25.  
  26. defaultproperties
  27. {
  28.     ActionString="play ambient sound"
  29.     SoundRadius=64
  30.     SoundVolume=128
  31.     SoundPitch=64
  32. }
  33.