@vestra-player/sdk - v1.11.3
    Preparing search index...

    Interface TriggerEvent

    What a trigger's enter and leave get.

    1.10.0

    interface TriggerEvent {
        state: PlayerState;
        range?: { start: number; end: number | null; index: number };
    }
    Index

    The player's state at the moment the player saw the condition flip.

    range?: { start: number; end: number | null; index: number }

    For a condition with When.position.in, when the position is in one of its ranges: that range as given, and its place in the list the player evaluated. start and end name the range; index is its place in that list: an enter that was on its way while the plugin gave a new list holding the same range (the trigger stays entered) carries the place in the old list, and the later leave the place in the new one.

    Type Declaration

    • Readonlystart: number

      The range's start, in media seconds.

    • Readonlyend: number | null

      The range's end, in media seconds (null: open).

    • Readonlyindex: number

      Its place in the list given to when.position.in, from 0.