# Value From Data Table (Unit Group)

Grammarname from the scope|Global/Local data table
FlagsNative | Function

Returns a unit group value from a data table. Data tables allow you to store and recall values using a string identifier.

# Arguments

  • bool<preset::DataScope> — Scope
  • string — Name

Returns — unitgroup

native unitgroup DataTableGetUnitGroup(
	bool global,
	string name,
);

Category: Data Table / Load Value

# Examples

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition02.sc2map/MapScript.galaxy:464

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))));
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition02.sc2map/MapScript.galaxy:470

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(lp_shuttle))));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition02.sc2mapMapScript.galaxy:464

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))));
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition02.sc2mapMapScript.galaxy:470

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(lp_shuttle))));
}

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1318

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(false, libSwaC_gf__LastDroppedUnitsDataTableName());
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3354

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(false, libVCMI_gf_PM_DropPod_LastDroppedUnitsDataTableName());
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:4594

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Entrances_C));
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:4933

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MinionGroupCreated_C, libGame_gv_eventParam_MinionGroupCreated_C));
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3409

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(true, libCore_gf__UnitDataName(libCore_ge__UnitDataType_UnitGroup, lp_unit, lp_index));
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:3516

unitgroup libNCMI_gf_LastDroppedUnits () {
    // Implementation
    return DataTableGetUnitGroup(false, libNCMI_gf_NM_DropPod_LastDroppedUnitsDataTableName());
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:2222


    // Implementation
    lv_attackForce = DataTableGetUnitGroup(libCOMI_gv_cMC_CoopAI_AttackForce_DataTableScope, libCOMI_gf_CM_CoopAI_AttackForce_ForceName());
    return lv_attackForce;
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:11324

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(false, libCOMI_gf_CM_DropPod_LastDroppedUnitsDataTableName());
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:2830


    // Implementation
    lv_attackingForce = DataTableGetUnitGroup(true, ("CT_GiftAtk_" + IntToString(UnitGetTag(lp_gift))));
    if ((libCOMU_gf_CT_GiftState(lp_gift) == libCOMU_ge_CT_GiftState_CT_GiftStatePlayer)) {
        libCOMU_gv_cT_GiftAmonPower += 1;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:13502

            lv_indexGift = UnitGroupUnitFromEnd(auto63BC9A0B_g, auto63BC9A0B_u);
            if (lv_indexGift == null) { break; }
            lv_attackingForce = DataTableGetUnitGroup(true, ("CT_GiftAtk_" + IntToString(UnitGetTag(lv_indexGift))));
            if ((lv_attackingForce != null)) {
                AISetGroupScriptControlled(lv_attackingForce, false);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:5099

        for ( ; ( (auto73B3DFB4_ai >= 0 && lv_scoreIndex <= auto73B3DFB4_ae) || (auto73B3DFB4_ai < 0 && lv_scoreIndex >= auto73B3DFB4_ae) ) ; lv_scoreIndex += auto73B3DFB4_ai ) {
            if ((DataTableGetString(true, ("CC_ScoreType_" + IntToString(lv_scoreIndex))) == (lp_scoreType))) {
                lv_scoreGroup = DataTableGetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(lv_scoreIndex)));
                UnitGroupRemove(lv_scoreGroup, lp_trackedUnit);
                return ;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:5112

    for ( ; ( (auto824015EC_ai >= 0 && lv_scoreIndex <= auto824015EC_ae) || (auto824015EC_ai < 0 && lv_scoreIndex >= auto824015EC_ae) ) ; lv_scoreIndex += auto824015EC_ai ) {
        if ((DataTableGetString(true, ("CC_ScoreType_" + IntToString(lv_scoreIndex))) == (lp_scoreType))) {
            lv_scoreGroup = DataTableGetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(lv_scoreIndex)));
            UnitGroupAdd(lv_scoreGroup, lp_trackedUnit);
            return ;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:8588

    lv_scoreIndex = 1;
    for ( ; ( (autoE0A82FF9_ai >= 0 && lv_scoreIndex <= autoE0A82FF9_ae) || (autoE0A82FF9_ai < 0 && lv_scoreIndex >= autoE0A82FF9_ae) ) ; lv_scoreIndex += autoE0A82FF9_ai ) {
        if ((UnitGroupHasUnit(DataTableGetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(lv_scoreIndex))), EventUnit()) == true) && (PlayerGroupHasPlayer(libCOOC_gf_NondefeatedPlayers(), EventUnitDamageSourcePlayer()) == true)) {
            lv_newScore = (DataTableGetFixed(true, ("CC_ScoreVal_" + IntToString(lv_scoreIndex) + "_" + IntToString(EventUnitDamageSourcePlayer()))) + EventUnitDamageAmount());
            DataTableSetFixed(true, ("CC_ScoreVal_" + IntToString(lv_scoreIndex) + "_" + IntToString(EventUnitDamageSourcePlayer())), lv_newScore);

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:1006

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnitGroup(false, libA3DDD02B_gf__LastDroppedUnitsDataTableName());
}