Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

ARG! Sensor & Die Help.

Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
12-24-2008 05:30
Ok.

So I need to have an object collide with the ground or any object at all, and shoot a sensor that looks for agents, loop through them all and report back.

Basicly heres the code:




collision_start(integer one){
llSensor("", NULL_KEY, AGENT, range, PI);
llDie();
}
//The land one is identical.



sensor(integer total){

llOwnerSay("sensor";);

integer i;

for(i=0;i<total;i++){
string hitString = llDetectedName(i) + "|" + whatAmI;
llShout(channel, hitString);
llOwnerSay(hitString);
}

llDie();

}



The problem comes when it hits the collision it starts the loop only detects one agent and dies, because the die after collision happends before the loop completes

any ideas?
Ron Khondji
Entirely unlike.
Join date: 6 Jan 2007
Posts: 224
12-24-2008 08:01
Just loose the llDie in the collision.
The one in sensor is more then enough since you can only die once.

If you want it to die if there's no-one around use no_sensor to llDie it.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-24-2008 08:06
testing blah blah blah, Mary had a little lamb.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum