Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetDamage on collision

Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
01-21-2008 08:52
not sure if it is posible but, is there a way to set damage of a bullet when it collides with a avatar like this?


CODE

default
{
collision_start(integer num_detected)
{
if(llDetectedType(0) & AGENT)
{
if(AGENT == llGetOwner())
{
llSetDamage(0);
}
}
else
{
llSetDamage(100);
}
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-21-2008 10:31
As far as I know, once the collision is detected it is too late to set damage. If the object keeps colliding instead of bouncing immediately away though, maybe it'd work. **shrug**