Guest User

Untitled

a guest
Jan 15th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string sound1 = "";
  2. string sound2 = "";
  3.    
  4. default
  5. {
  6.     state_entry()
  7.     {
  8.         llPreloadSound(sound1);
  9.         llPreloadSound(sound2);
  10.         llSetSoundQueueing(TRUE);
  11.         llSetTimerEvent(.3);
  12.     }
  13.  
  14.     timer()
  15.     {
  16.         string anim = llGetAnimation(llGetOwner());
  17.         if ((anim == "Walking") || (anim == "Running") || (anim == "Turning Left") || (anim == "Turning Right") || (anim == "CrouchWalking"))
  18.         {
  19.             llPlaySound(sound1,1.0);
  20.             llPlaySound(sound2,1.0);
  21.         }
  22.         else
  23.         {
  24.             llStopSound();
  25.         }
  26.     }
  27.    
  28.     on_rez(integer n)
  29.     {
  30.         llResetScript();
  31.     }
  32. }
Add Comment
Please, Sign In to add comment