rednode API - v0.80.1
    Preparing search index...

    Interface NpcDownedEvent

    The "npcDowned" event (#61): a person was defeated or killed, sent from the two places the game finds and rewards the killer. Every person: gangers, police, civilians, drones and mechs. One event each for defeated and for killed, so a person defeated and then finished off sends two (the same entity); count by entity to count people. People placed in the world already down (a body at a crash site) send one "by none" event as they stream in, after each load too: keep to byPlayer to count V's fights.

    game.on<NpcDownedEvent>("npcDowned", (e) => {
    if (e.byPlayer && e.affiliation === "Factions.Maelstrom") console.log("V downed a Maelstrom ganger");
    });
    interface NpcDownedEvent {
        affiliation: string | null;
        by: DownedBy;
        byPlayer: boolean;
        entity: string;
        entityId?: string;
        entityType?: string;
        frame: number;
        killed: boolean;
        language?: string;
        name: string;
        record: string | null;
        text?: string;
        value: number;
    }

    Hierarchy (View Summary)

    Index
    affiliation: string | null

    The record of the person's affiliation, such as "Factions.Maelstrom" or "Factions.MaelstromAndroid", the same in every language; null when they have none. When REDnode does not know the name it is the "0x..." id: compare with tweakdb.id(...).

    Who the game credits: V, a companion of V's, someone else, or nobody found.

    byPlayer: boolean

    True when V downed them, by any means the game credits to V, or one of V's companions or drones did.

    entity: string

    The person's entity id hash, as a string: the same as entityId, for further api calls while they are still there.

    entityId?: string

    For entity events (see world): the entity's ID hash, as a string.

    entityType?: string

    For entity events: the entity's class, for example "gameObject".

    frame: number

    The plugin's frame counter when the event was sent.

    killed: boolean

    True when the game killed them; false when it left them in its defeated state: down on the ground, often still moving, and able to be finished off (which then sends a second event with killed: true). Which one comes depends on the damage: in the first test one Overheat left its target defeated, Contagion and then Overheat killed. Non-lethal takedowns are defeated too. Count both as downed.

    language?: string

    For the "language" event: the game's new interface language, such as "fr-fr".

    name: string

    The event name, for example "PlayerPuppet.OnGameAttached".

    record: string | null

    The person's character record, such as "Character.maelstrom_grunt1_melee1_baseball_ma", or its "0x..." id when REDnode does not know its name.

    text?: string

    For entity events a script sends with a text (REDnode_EntityText), such as quickhacks's: the text.

    value: number

    A number sent with the event.