User:Toy Wylie/Meeroos/Meeroo Finder: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Toy Wylie (talk | contribs)
added script
 
Toy Wylie (talk | contribs)
refined
Line 3: Line 3:
<lsl>default
<lsl>default
{
{
    on_rez(integer dummy)
    {
        llResetScript();
    }
     state_entry()
     state_entry()
     {
     {

Revision as of 10:56, 5 July 2011

Copy this script into a normal 0.5m box, sit on it and say the name of the Meeroo you are looking for. If it is within 96.0 meters of range, the box will move right above it.

<lsl>default {

   on_rez(integer dummy)
   {
       llResetScript();
   }
   state_entry()
   {
       llSitTarget(<0.25,0.0,0.55>,ZERO_ROTATION);
       llListen(0,"",llGetOwner(),"");
   }
   listen(integer c,string name,key k,string message)
   {
       llSensor(message+" Meeroo",NULL_KEY,SCRIPTED,96.0,PI);
   }
   no_sensor()
   {
       llOwnerSay("Not found.");
   }
   sensor(integer num)
   {
       while(llVecDist(llGetPos(),llDetectedPos(0))>9.0)
           llSetLinkPrimitiveParamsFast(LINK_THIS,
           [
               PRIM_POSITION,llDetectedPos(0)+<0.0,0.0,1.0>
           ]);
       llSetLinkPrimitiveParamsFast(LINK_THIS,
       [
           PRIM_POSITION,llDetectedPos(0)+<0.0,0.0,1.0>
       ]);
   }

} </lsl>