-->

FoxSan's 3D Tools and LSL Script Repository

Tons of LSL scripts, examples and 3D tools, free for all. There are currently 207 scripts and articles in this database.

Animated Shark Head

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);
 }
 
}

Frame 1

  1. {
  2. link_message(integer from, integer num, string action, key id)
  3. {
  4. if(action == "anim")
  5. {
  6. llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "15253117-cd68-fae6-d5e4-ca8eda5ac2bd", PRIM_SCULPT_TYPE_SPHERE]);
  7. }
  8. }
  9. }

Frame 2

default
{
 link_message(integer from, integer num, string action, key id)
 {
 if(action == "anim")
 {
 llSleep(0.1);
 llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "cdc0d2dd-9005-5044-cd47-ca47efc31df3", PRIM_SCULPT_TYPE_SPHERE]);
 }
 }
}

Frame 3

default
{
link_message(integer from, integer num, string action, key id)
{
if(action == "anim")
{
llSleep(0.2);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "fa02f225-2122-fcd8-3c3e-00df112f10cb", PRIM_SCULPT_TYPE_SPHERE]);
}
}
}

Frame 4

default
{
link_message(integer from, integer num, string action, key id)
{
if(action == "anim")
{
llSleep(0.3);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "3c3411e4-3829-bc23-924e-d05411a72b1f", PRIM_SCULPT_TYPE_SPHERE]);
}
}
}

Frame 5

default
{
 link_message(integer from, integer num, string action, key id)
 {
 if(action == "anim")
 {
 llSleep(0.4);
 llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "fa02f225-2122-fcd8-3c3e-00df112f10cb", PRIM_SCULPT_TYPE_SPHERE]);
 }
 }
}

Frame 6

default
{
link_message(integer from, integer num, string action, key id)
{
if(action == "anim")
{
llSleep(0.5);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "cdc0d2dd-9005-5044-cd47-ca47efc31df3", PRIM_SCULPT_TYPE_SPHERE]);
}
}
}

Frame 7

default
{
link_message(integer from, integer num, string action, key id)
{
if(action == "anim")
{
llSleep(0.6);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "15253117-cd68-fae6-d5e4-ca8eda5ac2bd", PRIM_SCULPT_TYPE_SPHERE]);
}
}
}

Frame 8

default
{
link_message(integer from, integer num, string action, key id)
{
if(action == "anim")
{
llSleep(0.7);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "f2151490-db9c-bb10-2048-c423b43aa5d1", PRIM_SCULPT_TYPE_SPHERE]);
}
}
}

Sound

default
{
 link_message(integer from, integer num, string action, key id)
 {
 if(action == "anim")
 {
 llLoopSound("25365198-05c6-c97b-c849-e5573fe38d92",1);
 }
 if(action == "stop")
 {
 llStopSound();
 }
 }
}

Comments are closed.