Basic Pose Ball script

Written by Kitsune

This script is almost as simple as can be, so it is easy to make changes to. To use it:

  1. Type the desired animation name into the script by replacing the default build in: "stand".
  2. If the animation is not build in, then drop the animation in the pose ball prim
  3. Save(compile) the script in the pose ball prim

Besides handling the animation, the script has only few features:

  1. It hides the ball prim on sit and shows it on unsit
  2. Sets SitText to the name of the animation
  3. Has neither hide or show on chat commands. This makes it "Low Lag"
  4. Has no floating/hover text

 

// Basic pose ball script. by Dora Gustafson, Studio Dora 2010
// Free for anybody to read, copy, modify, compile, use, rip apart, trample on and flush
// v1.3 with Set Click Action

string animation = "stand"; // name of build in animation or animation in prim inventory 

default
{
    state_entry()
    {
        llSitTarget( <0.0, 0.0, 0.01>, ZERO_ROTATION );
        llSetSitText(llToUpper(animation));
        llSetClickAction(CLICK_ACTION_SIT);
    }
    changed(integer change)
    {
        if (change & CHANGED_LINK)
        {
            key sitter = llAvatarOnSitTarget() ;
            if(sitter != NULL_KEY) llRequestPermissions(sitter , PERMISSION_TRIGGER_ANIMATION);
            else
            {
                if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) llStopAnimation(animation);
                llSetAlpha(1.0, ALL_SIDES); // show prim
            }
        }
    }
    run_time_permissions(integer perm)
    {
        if ( perm & PERMISSION_TRIGGER_ANIMATION )
        {
            llSetAlpha(0.0, ALL_SIDES); // hide prim
            llStartAnimation(animation);
            llStopAnimation("sit");
        }
    }
}