Who Is Online

1
Online

Tuesday, 26 September 2017 05:40

Avatar Alert

integer switch=0;
key name;

default
{
    state_entry()
    {
        llWhisper(0,"Alert Script Active");
        name = llGetOwner();
    }

    touch_start(integer total_number)
    {
        if(switch==0)
        {
            switch=1;
            llSensorRepeat("","",AGENT,90.0,PI,20.0);
            llWhisper(0,"Alert on");
        }
        else if(switch==1) 
        {
            switch=0;
            llSensorRemove();
            llWhisper(0,"Alert off");
        }   
    }

    sensor(integer total_number)
    {
        vector pos = llGetPos();
        integer j;
        integer count = total_number;
        for (j = 0; j < count; j++)
        {
            if(llDetectedKey(j) != name)
            {
                float diff = llVecDist(pos,llDetectedPos(j));
                integer dist = llRound(diff);
                string result =  (llDetectedName(j)) + " " + ((string)dist) + "m";        
                llWhisper(0,result);
            }
        }
    }
        
    no_sensor()
    {
        llWhisper(0,"Nothing Found");
    }

}

 

Flash Scratch to SL - Your Scripting Tool

Script ImageNeed to write a LSL script and don't know how to script?  I know I hate trying to get my head around LSLS when I an in a time crunch. So why not give Flash Scratch a try! Its a great tool for learning and scoding your own scripts for Second Life without having to pay someone to do it and without a crash course in LSL

A Huge thanks to John Bennet of ATLAS Institute at University of Colorado and Eric Rosenbaum at MIT for writing Scratch for SL to begin with.

Read more: Flash Scratch to SL - Your Scripting Tool