HOME PRODUCTS HELP FREEBIES SCRIPTS TUTORIALS NEWS CONTACT
  Teleport to Store in-world!    |    Links   |    Blog    
Main Menu
Alicia's Raffle
Top Free Scripts
Who's Online
4 user(s) are online (1 user(s) are browsing Free Scripts)

Members: 0
Guests: 4

more...
Admin Login
Username:

Password:


Lost Password?

Register now!
Sites of Interest
Published Date: 2006/10/8 23:22:02
Views : 26100
Animation

Drop an animation and this script into an object to create a "poseball."

ATTENTION: This script is kind of old, so check out the more recent and lower lag version here: Poseball Script 2.


Change the name from "dance1" to the name of your animation.

Select "Pose!" from the pie menu to use, once completed.

You may touch the object to make it visible/not visible.

You might need to adjust the Sit Target. The first set of numbers (<0,0,1>) represent position. The others (<0,0,0,1>) are for rotation.

integer hidden = FALSE; // Stores whether the object is visible

default
{
    state_entry()
    {
        llSitTarget(<0,0,1>,<0,0,0,1>); // Set the target one meter above the ground
        llSetSitText("Pose!");
    }

    changed(integer change)
    {
        if(change & CHANGED_LINK) // If someone has sat on, or "linked," to this prim...
        {
            key avataronsittarget = llAvatarOnSitTarget();
            if( avataronsittarget != NULL_KEY )    //Someone is sitting on the object
            {
                // Before animating, first check if we have permission to do so:
                if ((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && llGetPermissionsKey() == avataronsittarget) {
                    // If we do, we can animate:
                    llStopAnimation("sit");
                    llStartAnimation("dance1");
                } else {
                    // If we dont, ask for them:
                    llRequestPermissions(avataronsittarget, PERMISSION_TRIGGER_ANIMATION);
                    // We'll animate in the run_time_permissions event, which is triggered
                    // When the user accepts or declines the permissions request.
                }
            }
        }
    }

    run_time_permissions(integer perm)
    {
        if(perm)
        {
            // Place the code here!
            llStopAnimation("sit");
            llStartAnimation("dance1");
        }
    }

    touch_start(integer total_number)
    {
        if(hidden)
        {
           hidden = FALSE;
           llSetLinkAlpha(LINK_SET,1,ALL_SIDES);
        }
        else
        {
           hidden = TRUE;
           llSetLinkAlpha(LINK_SET,0,ALL_SIDES);
        } 
    }
}

0
|  Links 
Printer Friendly Page Send this Script to a Friend
Now Available: ASD Visitor Tracker


Visit ASD Studios Hollywood
New Products

ASD Visitor Tracker

Advanced Visitor Counter
Stores your visitors to the web

ASD Group Info Board

First board in SL to show how
many Group members you have!

Alicia's Universe
Recent Scripts
Suggested Reading

© 2006- Alicia Stella | ASD Affiliate Programs | Policies | News | Help
Second Life® and the inSL logo are registered trademarks of Linden Research, Inc.
Alicia Stella Design is not affiliated with Second Life. No infringement is intended.