Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Collide not with Agent

Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
07-30-2006 10:54
I have this in part of script. want it to collide to trigger with everthing except an Agent, but it is collision with Agents is true with this as well. Is this right?
CODE

collision_start (integer num_detect)
{
if (llDetectedType(0) & (ACTIVE | PASSIVE | SCRIPTED))
{
llOwnerSay((string)num_detect + " collide");
//state pool;
}
}
EDIT:
After a little more testing and when it collides with an AGENT it is Also DetectedType of AVTIVE as well.
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
07-30-2006 11:32
Hmm, I'm sometimes finicky with bitwise operators, but can't you do...

CODE
collision_start(integer x) {
if (!(llDetectedType(0) & AGENT)) //Do stuff
}


...instead?
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
07-30-2006 11:50
yep works much better. TY. better than ORing, think part of my problem was my script got set to not running. doh!