Human death animation selection
The logic for selecting death animations for a human unit is stored in \properties\animation_selector\
human_death.inc
The selector processes requests whose names match the kill flag names that describe the circumstances of death.
Death animation request types
stand_dying
— death while standing;squat_dying
— death while sitting;lie_dying
— death while lying;swim_dying
— death while swimming;corpse_drop
andcorpse_drag
— corpse drop and dragging during death;default_dying
— a special request made once, with its result stored. This request should return a death animation to be played if no other is found. It ensures there are no standing dead soldiers after loading.
Death animation selection
After a death animation request is chosen (from the list above), the if
-block conditionals check different death circumstances.
Possible checks:
Death circumstance flags —
human_kill_flags
Terrain type —
terrain_pp
Equipment at time of death —
human_stuff
One of the kill flag checks is the direction check: front
or back
.
If an obstacle prevents the animation from playing, selection proceeds as follows:
Use the correct direction specified in the
human_kill_flags
parameter.Swap the direction flags (
front
↔back
).Use a variant without direction flags — intended for cases where the soldier falls in place and collides with the obstacle.
The main animation assignment method is random selection by weight from the specified animation list.
Post-death behavior of the human actor
After death, the engine places the corpse on the surface. To ensure that the body remains in the same position after the death animation finishes (e.g., death in a trench), the animation settings use the property:
{props "dont_update_placement_after_death"}
This property can be defined in properties\animation\human\
human_anm.ext
or in any animation settings list.
Last updated