Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llCollisionFilter isn't filtering

Jolan Nolan
wannabe
Join date: 12 Feb 2006
Posts: 243
10-14-2006 18:42
I'm having this huge problem that is just urking me!
I have made a small game where you control a ship from pad to pad. I have llCollisionFilter in the ship to have it explode if it touches anything other than "Landing_Pad" however no matter what it touches, ground and pad alike, it still dies. In the wiki it says to put empty Collisions in the parts that have no effect but that doesn't work either.
This is my first game using llCollisionFilter so what am I doing wrong?

landing pad is called "Lander_Pad"
llCollisionFilter("Lander_Pad", NULL_KEY, FALSE); Is under 'entry_event' and 'on_rez' and I have tried both FALSE and TRUE.

- Mike
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
10-14-2006 19:43
Have it tell you what it collides with before it explodes. I found it unreliable, although it still filters out a lot of the collisions with objects other than the one you're interested in.
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
10-15-2006 01:17
I'd use this:


CODE


explode()//Feel free to add in a llRezObject to spawn debris here, and maybe a llSetParticleSystem for an explosive particle effect.
{
llPlaySound("Explosion",1);
llDie();
}

default
{
collision_start(integer num_detected)
{
if(llDetectedName(0)!="Landing_Pad")
{
explode();
}
}
}




[edit]
used the wrong logic gate in the if statement. do'h!
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.