<br><br>
<div class="gmail_quote">On Tue, Jun 17, 2008 at 12:39 AM, Mike Mazur <<a href="mailto:mmazur@gmail.com">mmazur@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Dahlia,<br>
<div class="Ih2E3d"><br>On Tue, 17 Jun 2008 00:23:57 -0700<br>"Dahlia Trimble" <<a href="mailto:dahliatrimble@gmail.com">dahliatrimble@gmail.com</a>> wrote:<br><br>> I'll take a shot at these from a perspective of having used most of<br>
> them in sl scripts<br>><br>> On Mon, Jun 16, 2008 at 11:54 PM, Mike Mazur <<a href="mailto:mmazur@gmail.com">mmazur@gmail.com</a>> wrote:<br>><br></div>> <SNIP><br>
<div class="Ih2E3d">><br>> > What exactly do these values represent? According to<br>> > OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs<br>> > line 152, _key is "detected key" and _key2 is "owner key". What are<br>
> > these exactly? The position, velocity, rotation and _string (name)<br>> > properties make sense, but the _bool and _int ones don't.<br>><br>><br>> llDetectedKey() returns the UUID of the agent (avatar) or object that<br>
> was detected<br>> llDetectedOwner() returns the UUID of the owner of the object that was<br>> detected.<br><br></div>What does it mean to be "detected"? Let's take a simple example of a<br>box with a script inside that calls llDetectedKey() and<br>
llDetectedOwner() in touch_start. Then both would return the UUID of my<br>avatar?</blockquote>
<div> </div>
<div> </div>
<div>the llDetected() fuctions should only work when called within the code block of an event handler. For example, if I wanted to know which avatars were nearby, I would call llSensor(), specifying AGENTS as the type. If there were any qualified agents nearby, a sensor() event would be called within the script. I would then probably use some code such as:</div>

<div> </div>
<div>sensor( integer num_detected )</div>
<div>{</div>
<div>  integer i;</div>
<div> </div>
<div>  for ( i = 0; i < num_detected; i++ )</div>
<div>  {</div>
<div>    float distance = llVecDist( llGetPos(), llDetectedPos( i ) );</div>
<div>    llSay( 0, "agent " + llDetectedName( i ) + " detected at distance: " + (string) distance + " meters" );</div>
<div>  }</div>
<div>}</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br><br>Also, how can an object "touch" another object, with some function call?</blockquote>

<div> </div>
<div>I think the only way to touch an object is to click it with a mouse, which would generate the touch() events. Other objects cannot touch it, but they can collide with it or be detected with a sensor scan.</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br>
<div class="Ih2E3d"><br>> I dont know of any llDetected() functions that return booleans.<br><br></div>I think I was unclear, the _key, _key2, _int, _bool, etc. variables are<br>defined in the llDetectParams struct<br>
(OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs<br>line 152).<br></blockquote>
<div> </div>
<div>I havent looked at that code, but I dont think a script can access those.</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span><br>Thanks for the help thus far though. Things are becoming clearer.<br>
<div>
<div></div>
<div class="Wj3C7c"><br>Mike<br>_______________________________________________<br>Opensim-dev mailing list<br><a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br><a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
</div></div></blockquote></div><br>