Drink Animation Script

Thread Started By YoungMoney

4298
2
  • 64 Vote(s) - 2.72 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
Code:
// Triggers drink animation
// Asks permission of avatar first

// Author: unknow

default
{
    run_time_permissions(integer perm)
    {
        if (perm)
        {
            llAttachToAvatar(ATTACH_RHAND);
            llStartAnimation("drink");
        }
    }
    
    
    attach(key on)
    {
        if (on != NULL_KEY)
        {
            integer perm = llGetPermissions();
            
            if (perm != (PERMISSION_TRIGGER_ANIMATION | PERMISSION_ATTACH))
            {
                llRequestPermissions(on, PERMISSION_TRIGGER_ANIMATION | PERMISSION_ATTACH);
            }
            else
            {
                llStartAnimation("drink");
            }
            
        }
        else
        {
            llStopAnimation("drink");
        }
    }            
}
Reply


#2
does a drink animation have to be in the prim for this to work?
Reply


#3
nice post thanks for sharing
Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  Drink Animation 2 YoungMoney 0 2,686 03-04-2013, 02:00 AM
Last Post: YoungMoney
  Start Animation On Attach ☠ MosDef ☠ 0 2,155 02-20-2013, 09:01 PM
Last Post: ☠ MosDef ☠

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...