Who Is Online

2
Online

Wednesday, 22 November 2017 22:12

Basic Pose Ball script

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

 

Flash Scratch to SL - Your Scripting Tool

Script ImageNeed to write a LSL script and don't know how to script?  I know I hate trying to get my head around LSLS when I an in a time crunch. So why not give Flash Scratch a try! Its a great tool for learning and scoding your own scripts for Second Life without having to pay someone to do it and without a crash course in LSL

A Huge thanks to John Bennet of ATLAS Institute at University of Colorado and Eric Rosenbaum at MIT for writing Scratch for SL to begin with.

Read more: Flash Scratch to SL - Your Scripting Tool