Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Simplified poseball script by Kanashimi, ver 0.1
  2.  
  3. // Enter name of the animation here
  4. string ANIMATION = "Invisible Man";
  5. // Enter position here
  6. vector vecSitOffset = <0,0,1.1>; // Must not be 0,0,0 to work
  7. vector vecSitRotation = <0,0,0>; // Not quarternions, converted from XYZ rot
  8. // End of configuration
  9.  
  10. key avatar;
  11.  
  12. default
  13. {
  14.     state_entry()
  15.     {
  16.         // Rotation is converted from XYZ rotation instead of XYZS (Quarternion)
  17.         llSitTarget(vecSitOffset,llEuler2Rot(vecSitRotation * DEG_TO_RAD));
  18.     }
  19.  
  20.     changed(integer change)
  21.     {
  22.         if(change == CHANGED_LINK) {
  23.             avatar = llAvatarOnSitTarget();
  24.             if(avatar != NULL_KEY) {
  25.                 //llSetAlpha(1.0); // Uncomment to hide on sit
  26.                 llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION);
  27.                // llStopAnimation("sit");
  28.                // llStartAnimation(ANIMATION);
  29.             }
  30.             else {
  31.                 if (llGetPermissionsKey() != NULL_KEY) {
  32.                     llStopAnimation(ANIMATION);
  33.                     //llSetAlpha(0.0); // Uncomment to show on stand
  34.                 }
  35.             }
  36.         }    
  37.     }
  38.    
  39.     run_time_permissions(integer perm){
  40.        
  41.         if(perm & PERMISSION_TRIGGER_ANIMATION){
  42.             list l = llGetAnimationList(avatar);
  43.             integer max = llGetListLength(l);
  44.             while(max--){
  45.                 llStopAnimation(llList2Key(l,max));
  46.             }
  47.             llStartAnimation(ANIMATION);
  48.            
  49.            
  50.         }
  51.        
  52.        
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement