Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llDetectedType() bug?

Stickman Ingmann
Regislered User
Join date: 15 Jul 2005
Posts: 12
03-17-2006 02:37
I hadn't tested this pre-1.9, but I was under the impression that when "AGENT" was returned as a flag in llDetectedType(), no other flag would be set as well. I'm getting both the ACTIVE and AGENT bitflags set in a collision_end() event using llDetectedType.

This can easily be duplicated by putting the following script in a box and walking on it:

CODE

default
{
collision_end(integer num)
{
integer x;
for (x = 0; x < num; x++)
{
integer flags = llDetectedType(x);
llSay(0, "--Flags set on "+llDetectedName(x)+"----");
if (AGENT & flags)
llSay(0, "Agent flag set.");
if (ACTIVE & flags)
llSay(0, "Active flag set.");
if (SCRIPTED & flags)
llSay(0, "Scripted flag set.");
if (PASSIVE & flags)
llSay(0, "Passive flag set.");
}
}
}


I'm posting this in the forum because I don't know if this is a bug or not. llSensor() looking for ACTIVE doesn't pick up agents (moving or otherwise) from my testing.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
03-17-2006 03:00
Sensor is the one that is incorrect.

ACTIVE and PASSIVE refere to if something is currently requiring work to be done by the physics engine. When an av is seated on a non physical object, they become PASSIVE. Otherwise they are ACTIVE.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
03-19-2006 21:02
Looking at this real quick... I can see that it's returning ACTIVE AND AGENT. One reason, your IF structure, second, an agent can be ACTIVE and an AGENT at the same time. Hence why you are getting 2 flags in the bitwise var return both true.
_____________________