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

    Interface CombatEvent

    The "combat" event (#61): V's combat state changed, as the game itself sees it (its own listener on the player state machine's Combat value). Sent only when it changes; nothing is sent while it stays the same.

    game.on<CombatEvent>("combat", (e) => console.log(e.inCombat ? "Fight!" : "Calm again"));
    
    interface CombatEvent {
        entityId?: string;
        entityType?: string;
        frame: number;
        inCombat: boolean;
        language?: string;
        name: string;
        text?: string;
        value: number;
    }

    Hierarchy (View Summary)

    Index
    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.

    inCombat: boolean

    True when V entered combat, false when V left it (stealth counts as out of combat).

    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".

    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.