Home |
Add a script
|
||
|---|---|---|---|
| Category: | Contributor: | Description | |
| Pose Balls | Davy Maltz | DavyAnimBall | |
Clean and user-friendly Poseball script.
The Script
Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.
1 // The Script 2 //Feel Free To Mod The Following Values. ~Davy 3 Rev 2 - fixed the rotations to be expressed in degrees - Ferd Frederix 4 5 //Animation Options 6 string animation_name = "sit"; //The name of the animation to use (In Object Inv.) 7 8 //User/Owner Options 10 11 //Floating Text Options 12 string floating_text = ""; //What the floating text says in a string. 13 vector text_colour = <1,1,1>; //The color of the floating text in a vector. 14 float text_transparency = 1.0; //Transparency of the floating text. 0.0 to 1.0. 15 16 //Set Target/Sit Position Options 17 vector sit_offset = <0,-0.3,0.4>; //The offset from the ball while sitting. 19 20 rotation rot; 21 default 22 { 24 { 25 llResetScript(); 26 } 27 state_entry() 28 { 29 rot = llEuler2Rot(sit_rotation * DEG_TO_RAD); 30 llSitTarget(sit_offset,rot); 31 llSetText(floating_text,text_colour,text_transparency); 32 } 34 { 36 { 37 if(owner_only == FALSE) 38 { 40 } 42 { 43 llUnSit(llAvatarOnSitTarget()); 44 llSay(0,"Poseball Currently Set To Owner Only."); 45 } 46 } 47 if(llAvatarOnSitTarget() == NULL_KEY) 48 { 49 llResetScript(); 50 } 51 } 52 run_time_permissions(integer perm) 53 { 54 if(llAvatarOnSitTarget() != NULL_KEY) 55 { 56 if(perm) 57 { 58 llStopAnimation("sit"); 59 llStartAnimation(animation_name); 60 } 61 else if(!perm) 62 { 64 } 65 else 66 { 67 llStopAnimation(animation_name); 68 llResetScript(); 69 } 70 } 71 } 72 }