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

  1. class ACTION_PlaySound extends ScriptedAction;
  2.  
  3. var(Action)        sound    Sound;
  4. var(Action)        float    Volume;
  5. var(Action)        float    Pitch;
  6. var(Action)        bool    bAttenuate;
  7.  
  8. function bool InitActionFor(ScriptedController C)
  9. {
  10.     // play appropriate sound
  11.     if ( Sound != None )
  12.         C.GetSoundSource().PlaySound(Sound,SLOT_Interact,Volume,true,,Pitch,bAttenuate);
  13.     return false;    
  14. }
  15.  
  16. function string GetActionString()
  17. {
  18.     return ActionString@Sound;
  19. }
  20.  
  21. defaultproperties
  22. {
  23.     ActionString="play sound"
  24.     Volume=+1.0
  25.     Pitch=+1.0
  26.     bAttenuate=true
  27. }
  28.