Difference between revisions of "Spengbab Cube"

From Pool's Closed Wiki
Jump to: navigation, search
(New page: One of the oldest and simplest ways to annoy most people in SL. It is a wiggly follow cube with a spengbab texture and an annoying guy screaming really fucking loud. The sound seems to res...)
 
m (Reverted edits by Awugumi (Talk) to last revision by Afroduck)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
===Eyestalk Sensor===
 
===Eyestalk Sensor===
Responsible for the wiggly movement.
+
Responsible for the wiggly movement and seeking out the nearest avatar.
 
<lsl>
 
<lsl>
 
default
 
default
Line 153: Line 153:
 
}
 
}
 
</lsl>
 
</lsl>
 +
 +
 +
[[Category:Second Life]]

Latest revision as of 18:40, 24 November 2010

One of the oldest and simplest ways to annoy most people in SL. It is a wiggly follow cube with a spengbab texture and an annoying guy screaming really fucking loud. The sound seems to resonate well with multiple cubes and can become a speaker-killing horror when a sim is flooded with them. The cube contains 5 scripts so the cube can easily be customized (no sound, for example).

Eyestalk Sensor

Responsible for the wiggly movement and seeking out the nearest avatar. <lsl> default {

   state_entry()
   {
       llSensorRepeat("", "", AGENT, 96, PI, .5);
   }
   sensor(integer detected)
   {
       vector avatarspos = llDetectedPos(0);
       vector inclination = avatarspos - llGetPos();
       llSetPrimitiveParams([PRIM_FLEXIBLE, TRUE, 1, 0, .5, 0, 10, inclination]);
   }

} </lsl>


Spengbab Texture

The standard spengbab texture. <lsl> default {

   state_entry()
   {
       llSetTexture("3f0f9fa9-e6ae-7ab4-ec11-02381ab8ef06",ALL_SIDES);
   }

} </lsl>


Killswitch

To quickly remove ur cubes. To activate the killswitch say or shout: /666 getaids <lsl> default {

   state_entry()
   {
       key id = llGetOwner();
       llListen(666,"",id,"getaids");
   }
   listen(integer number, string name, key id, string m)
    {
       if (m=="getaids")
       {
       llDie();
   }

} } </lsl>


Bigben Scream

The annoying screaming guy. Leave out this script for a quiet - but still disturbing - wiggle cube that humps people's legs. <lsl> default {

   state_entry()
   {
       llLoopSound("382738ce-1bf9-e524-94e0-b78657c1d0a8", 1.0);
   }

} </lsl>


Eyestalk Movement

Always put this in last or else your cube will run away before it's done. This is the original code that does not allow the cube to move up or down. <lsl> default {

   state_entry()
   {
      llTargetOmega(<0,0,.1>,PI,1.0);
      llSetTimerEvent(.1);
      llSensorRepeat("", "", AGENT, 96, PI, .2);
   }
   
   sensor(integer num_detected)
   {
       vector here = llGetPos();
       vector target;
       if((llRound(llGetTime() / 30) % 2) == 0)
       {
           target = llDetectedPos(num_detected - 1) +
           <llFrand(6) - 3, llFrand(6) - 3, 0>;
       }
       else
       {
           target = llDetectedPos(0) +
           <llFrand(2) - 1, llFrand(2) - 1, 0>;
       }
       vector distance = target - here;
       vector fracdist = distance/2.0;
       
       if((here.x + fracdist.x) > 0 && (here.x + fracdist.x) < 256)
       {
           if((here.y + fracdist.y) > 0 && (here.y + fracdist.y) < 256)
           {
               llSetPos(here + <fracdist.x, fracdist.y, 0>);
           }
       }
   }

} </lsl>


Eyestalk Movement Z

This is a recently updated version that adds the z-axis and can go as high as 4000 meters, the current build limit. Use this instead of Eyestalk Movement if you want the cube to move in all directions. <lsl> default {

   state_entry()
   {
      llTargetOmega(<0,0,.1>,PI,1.0);
      llSetTimerEvent(.1);
      llSensorRepeat("", "", AGENT, 96, PI, .2);
   }
   
   sensor(integer num_detected)
   {
       vector here = llGetPos();
       vector target;
       if((llRound(llGetTime() / 30) % 2) == 0)
       {
           target = llDetectedPos(num_detected - 1) +
           <llFrand(6) - 3, llFrand(6) - 3, 0>;
       }
       else
       {
           target = llDetectedPos(0) +
           <llFrand(2) - 1, llFrand(2) - 1, 0>;
       }
       vector distance = target - here;
       vector fracdist = distance/2.0;
       
       if((here.x + fracdist.x) > 0 && (here.x + fracdist.x) < 256)
       {
           if((here.y + fracdist.y) > 0 && (here.y + fracdist.y) < 256)
           {
               if((here.z + fracdist.z) > 0 && (here.z + fracdist.z) < 4000)
               {
                   llSetPos(here + <fracdist.x, fracdist.y, fracdist.z>);
               }
           }
       }
   }

} </lsl>