Difference between revisions of "Be happy"

From Second Life Wiki
Jump to navigation Jump to search
(New page: == Be Happy == Put this script in an attachment to make your avatar smile. //Everyone should be happy! //Emmas Seetan 21 September 2008 //16:11 default { state_entry() { ...)
 
m (Replaced <source> with <syntaxhighlight>)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Be Happy ==
Put this script in an attachment to make your avatar smile.
Put this script in an attachment to make your avatar smile.


//Everyone should be happy!
<syntaxhighlight lang="lsl2">
//Emmas Seetan 21 September 2008
// be happy
//16:11


default
default
{
{
    attach(key attached)
    {
        if (attached)
            llResetScript();
    //  else
    //      has been detached
    }
     state_entry()
     state_entry()
     {
     {
         llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
         key owner = llGetOwner();
         llSetTimerEvent(5.0);
 
        llRequestPermissions(owner, PERMISSION_TRIGGER_ANIMATION);
    }
 
    run_time_permissions(integer perm)
    {
         if(perm & PERMISSION_TRIGGER_ANIMATION)
            llSetTimerEvent(5.0);
     }
     }


Line 20: Line 31:
         llStartAnimation("express_toothsmile");
         llStartAnimation("express_toothsmile");
     }
     }
   
}
    attach(key moo)
</syntaxhighlight>
    {
{{LSLC|Examples|Be happy}}
        if(moo != NULL_KEY)
        {
            llResetScript();
        }
    }

Latest revision as of 16:55, 3 February 2023

Put this script in an attachment to make your avatar smile.

//  be happy

default
{
    attach(key attached)
    {
        if (attached)
            llResetScript();
    //  else
    //      has been detached
    }

    state_entry()
    {
        key owner = llGetOwner();

        llRequestPermissions(owner, PERMISSION_TRIGGER_ANIMATION);
    }

    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_TRIGGER_ANIMATION)
            llSetTimerEvent(5.0);
    }

    timer()
    {
        llStartAnimation("express_toothsmile");
    }
}