Join us in Phaze Demesnes

LSL Script Library Home   Add a script Show All
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
9 integer owner_only = FALSE; //TRUE or FALSE to only let the owner use the ball.
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.
18 vector sit_rotation = <0,0,-90>; //The avatar rotation while sitting.
19
20 rotation rot;
21 default
22 {
23 on_rez(integer start_param)
24 {
26 }
28 {
29 rot = llEuler2Rot(sit_rotation * DEG_TO_RAD);
30 llSitTarget(sit_offset,rot);
31 llSetText(floating_text,text_colour,text_transparency);
32 }
33 changed(integer change)
34 {
35 if(change & CHANGED_LINK && llAvatarOnSitTarget() != NULL_KEY)
36 {
37 if(owner_only == FALSE)
38 {
40 }
41 else if(owner_only == TRUE && llAvatarOnSitTarget() != llGetOwner())
42 {
44 llSay(0,"Poseball Currently Set To Owner Only.");
45 }
46 }
48 {
50 }
51 }
53 {
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);
69 }
70 }
71 }
72 }