This script is almost as simple as can be, so it is easy to make changes to. To use it:
- Type the desired animation name into the script by replacing the default build in: "stand".
- If the animation is not build in, then drop the animation in the pose ball prim
- Save(compile) the script in the pose ball prim
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
- Has neither hide or show on chat commands. This makes it "Low Lag"
- 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");
}
}
}