Aim Detection

This script detects who's aiming at you.


//This script was designed by Han Shuffle AKA MichaelRyan Allen AKA Dugley Reanimator
//Cleaned up a bit by another resident.
//Cleaned up some more by another resident.
        // black and transparent floattext
        llSetText("", ZERO_VECTOR, (float)FALSE);
        llSensorRepeat("", "", AGENT_BY_LEGACY_NAME, 90, PI, 0.1);
    sensor(integer num_detected)
        list output;
        integer i;
            key agentKey = llDetectedKey(i);
            string agentName = llDetectedName(i);
            vector agentPosition = llDetectedPos(i);
            rotation agentRotation = llDetectedRot(i);
            vector ownPosition = llGetPos();
            if (llGetAgentInfo(agentKey) & AGENT_MOUSELOOK)
                if (llVecDist(ownPosition, agentPosition+llRot2Fwd(agentRotation)*llVecDist(ownPosition,agentPosition)) < 1.5)
                    output += [agentName];
        while (++i < num_detected);
        llSetText(llDumpList2String(output, "\n"), <1.0, 1.0, 1.0>, (float)TRUE);


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