Search This Blog

Friday, November 11, 2016

Eat animation script

//Define Animation from the invertory

string anim ="drink";
string anim2 ="hold_R_handgun";

//Trigger Animation

default
{
    attach(key victim)
    {
    if(victim == NULL_KEY)
    {
          llStopAnimation(anim);
          llStopAnimation(anim2);
          llSetTimerEvent(0);
         
        }
        else
        {
         llRequestPermissions(victim,PERMISSION_TRIGGER_ANIMATION);
    }
}

   run_time_permissions(integer permissions)
    {
        if (PERMISSION_TRIGGER_ANIMATION & permissions)
        {
        llStartAnimation(anim);
        llStartAnimation(anim2);
        llWhisper(0,"Chinese Meat Burger!! Delicious!");
        llSetTimerEvent(5);
        }
    }

//Animation Timer

   timer()
   {
    llStartAnimation(anim2);
    llStartAnimation(anim);
    }

}





No comments:

Post a Comment