Add SIT_FLAG_NO_DAMAGE to llSetLinkSitFlags for LLCS2
complete
Jessicatz Fairymeadow
This flag would stop damage from being applied the sitter on that prim.
A use-case I run into is in combat vehicles that need to track their own damage and, because of the unknown order of on_damage events, rely on final_damage to see how much damage ended up getting through.
Any leftover damage in final_damage
must not
be applied to the sitter, otherwise they will most likely just die instead of the vehicle absorbing said damage into their own hitpoints.Log In
This post was marked as
complete
Rider Linden
in progress
Thunder Rahja
Additional flags suggested: SIT_FLAG_DAMAGE_PASSTHROUGH and SIT_FLAG_DAMAGE_TO_SITTER
Thunder Rahja
Alternative: In the current test version (Combat2 2024-03-29.8486222382), the
on_damage
event triggers both for attachments and the object the avatar receiving damage is sitting on, allowing vehicles to reduce damage to 0 if desired.CombatLog outputs a damage event for both the object sat on and the avatars targeted and/or seated, so long as the object has an
on_damage
event.In my testing, vehicles appear to process
on_damage
first, before attachments, when the damage source targets a seated avatar. Vehicles also fire final_damage
before
attachments fire on_damage
, so damage seems to still be passed on from vehicle -> sitters as is current behavior.An avatar can sit on only one object at a time, so vehicle
on_damage
and final_damage
events are far less likely to compete in a race condition with other vehicle scripts. Keep in mind that the damage values provided in a vehicle's final_damage
event are how much damage will be divided and distributed evenly between all sitters.