Guest User

Untitled

a guest
Jan 16th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string sound1 = "";  
  2. string sound2 = "";
  3. string sound3 = "";  
  4.  
  5. integer play = 0;
  6.  
  7. default
  8. {
  9.     state_entry()
  10.     {
  11.         llPreloadSound(sound1);
  12.         llPreloadSound(sound2);
  13.         llPreloadSound(sound3);
  14.         //llSetSoundQueueing(TRUE);
  15.         llSetTimerEvent(.3);
  16.     }
  17.  
  18.     timer()
  19.     {
  20.         llPreloadSound(sound1);
  21.         llPreloadSound(sound2);
  22.         llPreloadSound(sound3);
  23.         string anim = llGetAnimation(llGetOwner());
  24.         if ((anim == "Walking") || (anim == "Running") || (anim == "Turning Left") || (anim == "Turning Right") || (anim == "CrouchWalking"))
  25.         {
  26.             if(play == 0)
  27.             {
  28.                 llResetTime();
  29.                 play = 1;
  30.             }
  31.             else if(play == 1)
  32.             {
  33.                 llPlaySound(sound1,1.0);
  34.                 play = 2;
  35.             }
  36.             else if(play == 2)
  37.             {
  38.                 if(llGetTime() > 9.989)
  39.                 {
  40.                     play = 3;
  41.                 }
  42.             }
  43.             else if(play == 3)
  44.             {
  45.                 llResetTime();
  46.                 llPlaySound(sound2,1.0);
  47.                 play = 4;                
  48.             }
  49.             else if(play == 4)
  50.             {
  51.                 if(llGetTime() >= 9.989)
  52.                 {
  53.                     play = 5;
  54.                 }
  55.             }
  56.             else if(play == 5)
  57.             {
  58.                 llResetTime();
  59.                 llPlaySound(sound3,1.0);
  60.                 play = 6;                
  61.             }
  62.             else if(play == 6)
  63.             {
  64.                 if(llGetTime() >= 7.769)
  65.                 {
  66.                     play = 0;
  67.                 }
  68.             }
  69.         }
  70.         else
  71.         {
  72.             llStopSound();
  73.             play = 0;
  74.         }
  75.     }
  76.    
  77.     on_rez(integer n)
  78.     {
  79.         llResetScript();
  80.     }
  81. }
Add Comment
Please, Sign In to add comment