Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Pose Balls AO_Overriding_Pose_Ball  

AO_Overriding_Pose_Ball

Tired of having to turn your animation overrider off and on whenever you want to sit on a poseball? Just drop this script in along with the pose and it will automatically stop your active animations. When you stand up, your AO will still be running and active.

Category: Pose Balls
By : jesse barnett
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for AO_Overriding_Pose_Ball
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. AO_Overriding_Pose_Ball_1.lsl
1 //AO Overrider Pose Ball Script V 1.2
2 //Updated 11/09/2006
3 //Created by Jesse Barnett
4 //Edited to check if there is an animation to stop
5 //and Sit Position is stored in Object Description
6 //Drop this in a prim along with an animation. Store the sit
7 //position in the Object description
8 //Example; <0.0, 0.0, 1.0>
9 //If you change this then reset the script by using right
10 //click/reset for changes to apply immediately. If you forget then it will display
11 //"reset script" when you sit. Just stand and sit again for changes to take effect
12
13
14 //To see how it works and hear it go through the animations it is stopping, then
15 //make idebug = TRUE;
16 integer idebug = FALSE;//if TRUE then llOwnerSay sdebugs
17 string sdebug;
18 integer perm;//permissions
19 string anim2run;//animation in inventory
20 vector sit_pos;//adjust as needed in object description Example: <0.0, 0.0, 1.0>
21 list anims2stop;//default or AO sit animation
22 float sleep = 0.5;//duration of llSleep in seconds
23
24 debug(){
25 if(idebug == 1)
26 llOwnerSay(sdebug);
27 }
28
29 sit_desc_change(){
30 if((sit_pos + (vector)llGetObjectDesc()) != (sit_pos* 2))
32 //This checks to see if the description field matchs the stored position
33 else
34 llSitTarget(sit_pos, ZERO_ROTATION);
35 }
36
37 stop_anim(){
38 integer list_pos = 0;
39 integer list_length = llGetListLength(anims2stop);
40 sdebug = (string)list_length;
41 debug();
42 if(list_length > 0){
43 while(list_pos < list_length){
44 llStopAnimation(llList2String(anims2stop, list_pos));
45 sdebug = (string)list_pos;
46 debug();
47 list_pos++;
48 }
49 }
50 }
51
52 default{
54 llSetTouchText("Reset");
55 llOwnerSay("Script Reset.");
57 sit_pos = (vector)llGetObjectDesc();
58 sit_desc_change();
59 perm=llGetPermissions();
60 }
61
62 touch_start(integer num_detected) {
64 }
65
66 changed(integer change){
67 if(change & CHANGED_LINK)
70 }
71
72 else{
73 perm=llGetPermissions();
74 if((perm & PERMISSION_TRIGGER_ANIMATION) && llStringLength(anim2run)>0)
75 llStopAnimation(anim2run);
77 }
78 }
81 anims2stop = [];//Clears the list
82 sdebug = "perms granted";
83 llStopAnimation("sit");
84 llSleep(sleep);//need sleep to give avatar time to cycle from stand
85 //to default sit to AO sit
87 sdebug = llList2CSV(anims2stop);
88 debug();
89 stop_anim();//This runs the subroutine up top .
91 llStartAnimation(anim2run);
92 sdebug = "anim2run started";
93 debug();
94 }
95 }
96

Back to the Best Free Tools in Second Life and OpenSim.