Under current behavior, all damage sent to an agent sitting on an object is redirected to the object sat on and then redistributed to all sitters. This includes
llDamage
called from a vehicle targeting one of its sitters. Please allow
llDamage
called from an object/vehicle to be sent directly to its sitters.
Demonstration: Create two or more prims and link them together, create the following script in the root link, and then sit on and click the object:
default
{
state_entry()
{
llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_SIT_TARGET, 1, <0.5,0,0.5>, ZERO_ROTATION]);
}
touch_start()
{
key root = llList2Key(llGetObjectDetails(llDetectedKey(0), [OBJECT_ROOT]), 0);
if (root = llGetKey()) // avatar is sitting on me
{
llDamage(llDetectedKey(0), 20, 4);
llSay(0, "Sent 20 damage to " + llKey2Name(llDetectedKey(0)));
}
}
on_damage(integer num_detected)
{
llSay(0, "I took damage");
}
}