User:Toady Nakamura/Smile Script: Difference between revisions
Jump to navigation
Jump to search
m added script. |
m minor edit & watch |
||
| Line 1: | Line 1: | ||
For humanoid avatars... this script in a prim & worn will make your avatar smile!! | |||
Found in a 2008 freebie, modified slightly by [[User:Toady Nakamura|Toady Nakamura]] | |||
<lsl> | <lsl> | ||
default | default | ||
Revision as of 13:17, 14 May 2012
For humanoid avatars... this script in a prim & worn will make your avatar smile!! Found in a 2008 freebie, modified slightly by Toady Nakamura
<lsl>
default {
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
// getting permission here is automatic, because the item is worn
// triggers run_time_permissions event
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
llSetTimerEvent(5.0);
// since permission was granted set a 5 second timer event
}
}
timer()
{
llStartAnimation("express_toothsmile");
// every five seconds, replay the system animation
}
attach(key moo)
{
if(moo)
{
llResetScript();
// when the item is worn, reset the script
}
}
}
</lsl>