DCS World Typescript
    Preparing search index...

    2.9.29.27468

    interface l_Group {
        Category: {
            AIRPLANE: number;
            GROUND: number;
            HELICOPTER: number;
            SHIP: number;
            TRAIN: number;
        };
        className_: string;
        parentClass_: { className_: string };
        activate(): void;
        destroy(): void;
        embarking(...arguments_: unknown[]): unknown;
        enableEmission(enabled: boolean): void;
        getByName(name: string): l_Group | undefined;
        getCategory(): number;
        getCategoryEx(): number;
        getCoalition(): number;
        getController(): l_Controller;
        getID(): number;
        getInitialSize(): number;
        getName(): string;
        getSize(): number;
        getUnit(index: number): l_Unit | undefined;
        getUnits(): l_Unit[];
        isExist(): boolean;
        markGroup(...arguments_: unknown[]): unknown;
        tonumber(...args: any[]): unknown;
    }

    Hierarchy (View Summary)

    Index
    Category: {
        AIRPLANE: number;
        GROUND: number;
        HELICOPTER: number;
        SHIP: number;
        TRAIN: number;
    }
    className_: string
    parentClass_: { className_: string }
    • TODO: troop-embarkation payload is an undocumented engine-native structure. This explicit override prevents an any[] API.

      Parameters

      • ...arguments_: unknown[]

      Returns unknown

    • Looks up a group by its exact mission name. The function can return groups configured for late activation, and returns nil when no matching group is known to the mission.

      Parameters

      • name: string

        Exact Mission Editor or dynamically assigned group name.

      Returns l_Group | undefined

      Matching group object, or undefined when not found.

      const group = Group.getByName("Springfield 1");
      if (!group) env.warning("Springfield 1 was not found");
    • Returns the engine's extended group category.

      Returns number

      `const category = group.getCategoryEx();`
      
    • Returns the coalition that currently owns the group. Compare the result with coalition.side.NEUTRAL, RED, or BLUE rather than relying on the underlying numeric values.

      Returns number

      Coalition identifier from coalition.side.

      const group = Group.getByName("Springfield 1");
      if (group?.getCoalition() === coalition.side.BLUE) {
      env.info("Springfield 1 belongs to blue");
      }
    • Returns the group's runtime mission identifier. The ID is suitable for APIs such as trigger.action.addOtherCommandForGroup, but should not be treated as a stable identifier across separate mission runs.

      Returns number

      Numeric runtime group ID.

      const group = Group.getByName("Springfield 1");
      if (group) env.info(`Group ID: ${group.getID()}`);
    • Returns the number of units currently present in the group. The value falls as units are destroyed and may therefore be lower than the initial size.

      Returns number

      Current unit count.

      const group = Group.getByName("Convoy");
      if (group) env.info(`${group.getSize()} vehicles remain`);
    • Returns the unit at a one-based Lua group index. DCS returns nil when the index is outside the group's current range.

      Parameters

      • index: number

        One-based unit index between 1 and getSize().

      Returns l_Unit | undefined

      Unit at the requested index, or undefined when it does not exist.

      const lead = Group.getByName("Springfield 1")?.getUnit(1);
      if (lead) env.info(`Lead unit: ${lead.getName()}`);
    • TODO: engine-native group marking contract is absent from installed Lua sources and Hoggit.

      Parameters

      • ...arguments_: unknown[]

      Returns unknown