<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hagar+Osterham</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hagar+Osterham"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Hagar_Osterham"/>
	<updated>2026-06-06T17:27:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Aim_Detection&amp;diff=1176814</id>
		<title>Aim Detection</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Aim_Detection&amp;diff=1176814"/>
		<updated>2013-02-18T09:29:47Z</updated>

		<summary type="html">&lt;p&gt;Hagar Osterham: needed to change &amp;#039;while (++i &amp;lt; n);&amp;#039; to &amp;#039;while (++i &amp;lt; num_detected)&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This script detects who&#039;s aiming at you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//This script was designed by Han Shuffle AKA MichaelRyan Allen AKA Dugley Reanimator&lt;br /&gt;
//Cleaned up a bit by another resident.&lt;br /&gt;
//Cleaned up some more by another resident.&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        // black and transparent floattext&lt;br /&gt;
        llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, (float)FALSE);&lt;br /&gt;
&lt;br /&gt;
        llSensorRepeat(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;, AGENT_BY_LEGACY_NAME, 90, PI, 0.1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    sensor(integer num_detected)&lt;br /&gt;
    {&lt;br /&gt;
        list output;&lt;br /&gt;
&lt;br /&gt;
        integer i;&lt;br /&gt;
        do&lt;br /&gt;
        {&lt;br /&gt;
            key agentKey = llDetectedKey(i);&lt;br /&gt;
            string agentName = llDetectedName(i);&lt;br /&gt;
            vector agentPosition = llDetectedPos(i);&lt;br /&gt;
            rotation agentRotation = llDetectedRot(i);&lt;br /&gt;
            vector ownPosition = llGetPos();&lt;br /&gt;
&lt;br /&gt;
            if (llGetAgentInfo(agentKey) &amp;amp; AGENT_MOUSELOOK)&lt;br /&gt;
            {&lt;br /&gt;
                if (llVecDist(ownPosition, agentPosition+llRot2Fwd(agentRotation)*llVecDist(ownPosition,agentPosition)) &amp;lt; 1.5)&lt;br /&gt;
                    output += [agentName];&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        while (++i &amp;lt; num_detected);&lt;br /&gt;
&lt;br /&gt;
        llSetText(llDumpList2String(output, &amp;quot;\n&amp;quot;), &amp;lt;1.0, 1.0, 1.0&amp;gt;, (float)TRUE);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hagar Osterham</name></author>
	</entry>
</feed>