Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
I have had this code in the SL Forums scripting library for nearly a year now. Really can't understand why it never took off. It makes it so you don't have to do the totally annoying right click, sit, type "AO off" into open chat etc thing. It works great and now updated to stop multiple animations. If you want to play around then set idebug to TRUE and with your AO running, click and start a dance animation. Then sit on the poseball and it will owner chat as it counts down the anims it is stopping.
HINT: In the edit window of the poseball, go to the bottom and set the right click option to "sit" instead of touch. Still can't believe all of the places that are still using the right click/sit pie menu for poseballs and teleports. Create it right and just let the user touch it to sit.
//AO Overrider Pose Ball Script V 2.0
//Updated 11/09/2006
//Created by Jesse Barnett
//Editted to stop multiple concurrent animations
//
//Drop this in a prim along with an animation. Store the sit
//position in the Object description
//Example; <0.0, 0.0, 1.0>
//
//If you change this then reset the script by using right
//click/reset for changes to apply immediately. If you forget then it will display
//"reset script" when you sit. Just stand and sit again for changes to take effect
integer idebug = FALSE;//if TRUE then llOwnerSay sdebugs
string sdebug;
integer perm;//permissions
string anim2run;//animation in inventory
vector sit_pos;//adjust as needed in object description Example: <0.0, 0.0, 1.0>
list anims2stop;//default or AO sit animation
float sleep = 0.5;//duration of llSleep in seconds
debug(){
if(idebug == 1)
llOwnerSay(sdebug);
}
sit_desc_change(){
if((sit_pos + (vector)llGetObjectDesc()) != (sit_pos* 2))
llResetScript();
//This checks to see if the description field matchs the stored position
else
llSitTarget(sit_pos, ZERO_ROTATION);
}
stop_anim(){
integer list_pos = 0;
integer list_length = llGetListLength(anims2stop);
sdebug = (string)list_length;
debug();
if(list_length > 0){
while(list_pos < list_length){
llStopAnimation(llList2String(anims2stop, list_pos));
sdebug = (string)list_pos;
debug();
list_pos++;
}
}
}
default{
state_entry(){
llSetTouchText("Reset");
llOwnerSay("Script Reset.");
anim2run=llGetInventoryName(INVENTORY_ANIMATION,0) ;
sit_pos = (vector)llGetObjectDesc();
sit_desc_change();
perm=llGetPermissions();
}
touch_start(integer num_detected) {
llResetScript();
}
changed(integer change){
if (change & CHANGED_LINK)
if (llAvatarOnSitTarget() != NULL_KEY){
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);
}
else{
perm=llGetPermissions();
if ((perm & PERMISSION_TRIGGER_ANIMATION) && llStringLength(anim2run)>0)
llStopAnimation(anim2run);
llSetAlpha(1.0, ALL_SIDES);
}
}
run_time_permissions(integer perm){
if (perm & PERMISSION_TRIGGER_ANIMATION)
anims2stop = [];//Clears the list
sdebug = "perms granted";
llStopAnimation("sit");
llSleep(sleep);//need sleep to give avatar time to cycle from stand
//to default sit to AO sit
anims2stop = llGetAnimationList(llAvatarOnSitTarget());
sdebug = llList2CSV(anims2stop);
debug();
stop_anim();//This runs the subroutine up top .
llSetAlpha(0.0, ALL_SIDES);
llStartAnimation(anim2run);
sdebug = "anim2run started";
debug();
}
}
Not to mess up Ordinal's nice shiny forum, but I'm using IE6 at work and am getting a huuuuge whitespace at the top of the post, and the last line in the code box just runs to the right for forever.
1 to 2 of 2