Jump to content

Basic Pose Ball script


Dora Gustafson
 Share

You are about to reply to a thread that has been inactive for 3484 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

New forum Edition

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 built-in: "stand".
  2. If the animation is not built-in, then drop the animation in the pose ball prim
  3. Save(compile) the script in the pose ball prim

Now you are ready to sit on the pose ball

// 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 built-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");
        }
    }
}

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

  • It hides the ball prim on sit and shows it on unsit
  • Sets SitText to the name of the animation
  • Sets "ClickAction" to Sit on a mouse click
  • Has neither hide or show on chat commands. This makes it "Low Lag"
  • Has no floating/hover text

Link to old forum

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
  • 6 months later...
  • 6 months later...
  • 3 weeks later...
  • 1 year later...
You are about to reply to a thread that has been inactive for 3484 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...