Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list animations = ["solo rfb-6 sit edge legs crossed","second animation"];
  2. integer animation_index = 0;
  3.  
  4. default
  5. {
  6.     state_entry()
  7.     {
  8.         llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
  9.     }
  10.    
  11.     on_rez(integer shellseat)
  12.     {
  13.         llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);      
  14.     }
  15.    
  16.     touch_end(integer num)
  17.     {
  18.         animation_index++;
  19.         if(animation_index >= llGetListLength(animations)) animation_index = 0; //roll back to 0 at the end of the list;
  20.     }
  21.  
  22.     run_time_permissions(integer perm)
  23.     {
  24.         if(perm)
  25.         {
  26.             string animation = llList2String(animations, animation_index);
  27.             llStartAnimation(animation);    
  28.             vector myPosition = llGetPos();
  29.             llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + .74, FALSE, 1.0);          
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement