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

  1. class ACTION_PlayLocalSound extends ScriptedAction;
  2.  
  3. var(Action)        sound    Sound;
  4.  
  5. function bool InitActionFor(ScriptedController C)
  6. {
  7.     local PlayerController P;
  8.  
  9.     // play appropriate sound
  10.         ForEach C.DynamicActors(class'PlayerController', P)
  11.             P.ClientPlaySound(Sound);
  12.     return false;    
  13. }
  14.  
  15. function string GetActionString()
  16. {
  17.     return ActionString@Sound;
  18. }
  19.  
  20. defaultproperties
  21. {
  22.     ActionString="play sound"
  23. }
  24.