This object starts to flap it’s jaw and play a laughing sound while worn and while you are typing. Include all these scripts in your object. You will need to add your own “check if typing” script. Easy enough :D
default
{
state_entry()
{
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "f2151490-db9c-bb10-2048-c423b43aa5d1", PRIM_SCULPT_TYPE_SPHERE]);
}
on_rez(integer start_param)
{
state default;
}
link_message(integer from, integer num, string action, key id)
{
if(action == "talk")
{
state Toggled;
}
}
}
state Toggled
{
state_entry()
{
llSetTimerEvent(0.1);
}
on_rez(integer start_param)
{
state default;
}
link_message(integer from, integer num, string action, key id)
{
if(action == "stop")
{
llSetTimerEvent(0);
state default;
}
}
timer()
{
llMessageLinked(LINK_SET, 0, "anim", NULL_KEY);
llSetTimerEvent(0.9);
}
}
(more…)