Skip to content

DeathDef beta ​

Interface of @v12-engine/client

ts
export interface DeathDef

The sequence of a death on the screen (UnitLook.death, onDeath, GameView.units.deathFor), view only: nothing of it decides anything in the game

Members ​

clip ​

ts
clip?: string;

The clip it falls with: the model's death when left out

collapse ​

ts
collapse?: CollapseLook | {
        look?: CollapseLook;
        time?: number;
        dust?: boolean | string | FxDef;
        pieces?: number;
    };

How a building comes down (CollapseLook): sink when left out; over time seconds (1.2), with dust where it stood (dust: the ready-made dust, or an effect of the game's), and as many pieces as pieces (for crumble and explode)

corpse ​

ts
corpse?: {
        lie?: number;
        sink?: number;
        fade?: number;
        decal?: FxDecal;
    };

How a unit's body lies (one with a death clip): lie seconds on the ground (2.5), then sink seconds into it (1.5), or faded out over fade seconds in place of sinking; a mark on the ground under it while it lies (decal)

debris ​

ts
debris?: DebrisPiece[];

Breaks into pieces of what it is made of, which fly and settle

fx ​

ts
fx?: string | DeathFx | readonly (string | DeathFx)[];

Effects played as it dies (DeathFx): an explosion, fire, dust. None when left out

how ​

ts
how?: Record<string, DeathDef>;

Said otherwise for a death of a how ('burnt', 'crushed'): over this, by the word the rules give it

keep ​

ts
keep?: boolean;

Kept as it is for the game's code: kit.model(id) reaches it, kit.letGo(id) takes it away

none ​

ts
none?: boolean;

Gone at once

pieces ​

ts
pieces?: {
        fx?: string | FxDef;
        share?: number;
        landed?: string | FxDef;
        params?: FxParams;
    };

Effects on its pieces as they break (shatter, debris, crumble, explode): on each piece as it flies (smoke trailing it), on a share of them (share, a third when left out), and where each lands

remains ​

ts
remains?: {
        model: string;
        time?: number;
        fade?: number;
        scale?: number;
        decal?: FxDecal;
    };

What is left where it stood, view only (rubble, ruins, a crater): a model under models/, lying time seconds (60) and sinking away over fade (3), and a mark on the ground under it (decal). What blocks the way or is cleared by workers is the rules' (a thing spawned in the death hook)

shatter ​

ts
shatter?: number;

Breaks its own model into about this many pieces, which fly away from what killed it and settle

sound ​

ts
sound?: string;

A sound of the game's, heard from where it died

strength ​

ts
strength?: number;

How hard it breaks: 1 a blow, 2 a blast