Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Baffled... while llVolumeDetect

Vade Blair
Tattoo Artist
Join date: 19 Mar 2004
Posts: 132
12-30-2004 20:04
integer burn = FALSE;

default
{
collision(integer tnum)
{
while (burn)
{
if (llVolumeDetect(TRUE))
{
burn = TRUE;
}
}
llSetDamage(10);
}
}

It damages once... then the prim dissappears! No physics on, nothing, if I put phantom on hard (checking it) it still poofs! What is happening?
_____________________
Selling exclusively on SLExchange : My Items

RaNdOm CrAp

Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
12-30-2004 20:17
Well....

llSetVolumeDetect really only makes the prim a phantom that triggers the collision event. What you're doing there is turning it on, which is successful so the IF statement rings true....

...so it sets the prim to do 10 points of damage, which it does, and that means the prim is then deleted, because that's what happens when llSetDamage is set.

Um... I think I'm being clear... :o
_____________________
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
12-30-2004 20:19
From: someone
Originally posted on the LSL Wiki:
llSetDamage(float damage)

Sets the amount of damage that will be done to an avatar that the scripted object collides with. The scripted object will be deleted immediately on colliding, no event handlers will be executed first.

==Chris

EDIT: Gah! Too late >_<
Vade Blair
Tattoo Artist
Join date: 19 Mar 2004
Posts: 132
12-30-2004 20:23
Hmmm I do not remember llSetDamage ever resolving with the prim deleting it's self. Well, this is a problem. I will see what I can come up with.
_____________________
Selling exclusively on SLExchange : My Items

RaNdOm CrAp

Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
12-30-2004 21:43
check This Wiki Page