The following resources comprise the damageable objects system:
SCRIPTS
Object damage v0.2
This script goes in the root prim of the damageable object. It offers a menu that allows the pos/rot of prims to be set for damaged and normal modes, and switching between those modes. See section USAGE below for more details.
Object damage child
This script goes into any child prim of the damageable object, and ensures that bullet collisions are passed to the root prim.
OBJECTS
Any of these objects can be linked to the damageable object, and will simulate an aspect of damage when appropriate (via link messages from the Object Damage script).
Damage flames
This prim has an animated flame texture which is switch from invisible to visible when the object is damaged. In addition, the prim is sliced on the Z axis to remove the upper part when not active, in order not to interfere with other operations.
Damage linked smoke (original)
The original smoke particle emitter
Damaged linked flame (Handy's)
A fire particle emitter
Damage linked smoke (Handy's)
Another smoke emitter, giving a different effect from the original
USAGE
To make an object damageable:
Drop the "object damage" script into the root prim
Edit the object as appropriate for normal and damaged prim positions/rotations and use the menu to "Set normal" and "Set damaged" states. Test by clicking "Normal" and "Damaged" to switch object between those states. Continue doing this until you're happy with the setup, then click "Finished".
Add the "Object damage child" script to any child prims that might receive bullet collisions.
Link in any combination of the "Damage linked" prims for fire and smoke
When the object receives a hit from a bullet or shell, the damaged mode will be triggered. When this happens, a notecard will be created in the object root prim; to reset the object to normal appearance, remove that notecard and use the menu.