# 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.sc2campaign

MapScript.galaxy

// L464
DataTableGetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))))
// L470
DataTableGetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(lp_shuttle))))
// L464
DataTableGetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))))
// L470
DataTableGetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(lp_shuttle))))

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L1318
DataTableGetUnitGroup(false, libSwaC_gf__LastDroppedUnitsDataTableName())

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L3354
DataTableGetUnitGroup(false, libVCMI_gf_PM_DropPod_LastDroppedUnitsDataTableName())

# mods/heroesdata.stormmod

GameLib.galaxy

// L4594
DataTableGetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Entrances_C))
// L4933
DataTableGetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MinionGroupCreated_C, libGame_gv_eventParam_MinionGroupCreated_C))

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L3409
DataTableGetUnitGroup(true, libCore_gf__UnitDataName(libCore_ge__UnitDataType_UnitGroup, lp_unit, lp_index))

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L3516
DataTableGetUnitGroup(false, libNCMI_gf_NM_DropPod_LastDroppedUnitsDataTableName())

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L2222
DataTableGetUnitGroup(libCOMI_gv_cMC_CoopAI_AttackForce_DataTableScope, libCOMI_gf_CM_CoopAI_AttackForce_ForceName())
// L11288
DataTableGetUnitGroup(false, libCOMI_gf_CM_DropPod_LastDroppedUnitsDataTableName())

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L2831
DataTableGetUnitGroup(true, ("CT_GiftAtk_" + IntToString(UnitGetTag(lp_gift))))
// L13503
DataTableGetUnitGroup(true, ("CT_GiftAtk_" + IntToString(UnitGetTag(lv_indexGift))))

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L5099
DataTableGetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(lv_scoreIndex)))
// L5112
DataTableGetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(lv_scoreIndex)))
// L8588
DataTableGetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(lv_scoreIndex)))

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L1006
DataTableGetUnitGroup(false, libA3DDD02B_gf__LastDroppedUnitsDataTableName())