# Save Data Table Value (Unit Group)
Grammar — Save value as name in the scope|Global/Local data table
Flags —Native
|Action
Saves a unit group value into a data table. Data tables allow you to store and recall values using a string identifier. If you save a data table value using a string identifier that already exists, you will overwrite the old value, even if it is a different data type than the value you are saving.
# Arguments
bool
<preset::DataScope> — Scopestring
— Nameunitgroup
— Value
Returns — void
native void DataTableSetUnitGroup(
bool global,
string name,
unitgroup val,
);
# Related
Category: Data Table / Save Value
- Save Data Table Value (Ability Command) —
void
— DataTableSetAbilCmd - Save Data Table Value (Actor) —
void
— DataTableSetActor - Save Data Table Value (Actor Scope) —
void
— DataTableSetActorScope - Save Data Table Value (AI Filter) —
void
— DataTableSetAIFilter - Save Data Table Value (Bank) —
void
— DataTableSetBank - Save Data Table Value (Boolean) —
void
— DataTableSetBool - Save Data Table Value (Byte) —
void
— DataTableSetByte - Save Data Table Value (Camera Object) —
void
— DataTableSetCameraInfo - Save Data Table Value (Cinematic) —
void
— DataTableSetCinematic - Save Data Table Value (Color) —
void
— DataTableSetColor - Save Data Table Value (Control) —
void
— DataTableSetControl - Save Data Table Value (Conversation) —
void
— DataTableSetConversation - Save Data Table Value (Conversation Reply) —
void
— DataTableSetReply - Save Data Table Value (Dialog) —
void
— DataTableSetDialog - Save Data Table Value (Dialog Item) —
void
— libNtve_gf_SaveDataTableValueDialogItem - Save Data Table Value (Difficulty Level) —
void
— libNtve_gf_SaveDataTableValueDifficultyLevel - Save Data Table Value (Doodad) —
void
— DataTableSetDoodad - Save Data Table Value (Integer) —
void
— DataTableSetInt - Save Data Table Value (Marker) —
void
— DataTableSetMarker - Save Data Table Value (Objective) —
void
— DataTableSetObjective - Save Data Table Value (Order) —
void
— DataTableSetOrder - Save Data Table Value (Ping) —
void
— DataTableSetPing - Save Data Table Value (Planet) —
void
— DataTableSetPlanet - Save Data Table Value (Player Color) —
void
— libNtve_gf_SaveDataTableValuePlayerColor - Save Data Table Value (Player Group) —
void
— DataTableSetPlayerGroup - Save Data Table Value (Point) —
void
— DataTableSetPoint - Save Data Table Value (Portrait) —
void
— DataTableSetPortrait - Save Data Table Value (Real) —
void
— DataTableSetFixed - Save Data Table Value (Region) —
void
— DataTableSetRegion - Save Data Table Value (Revealer) —
void
— DataTableSetRevealer - Save Data Table Value (Sound) —
void
— DataTableSetSound - Save Data Table Value (Sound Link) —
void
— DataTableSetSoundLink - Save Data Table Value (String) —
void
— DataTableSetString - Save Data Table Value (Text) —
void
— DataTableSetText - Save Data Table Value (Text Tag) —
void
— libNtve_gf_SaveDataTableValueTextTag - Save Data Table Value (Timer) —
void
— DataTableSetTimer - Save Data Table Value (Transmission) —
void
— DataTableSetTransmission - Save Data Table Value (Transmission Source) —
void
— DataTableSetTransmissionSource - Save Data Table Value (Trigger) —
void
— DataTableSetTrigger - Save Data Table Value (Unit) —
void
— DataTableSetUnit - Save Data Table Value (Unit Filter) —
void
— DataTableSetUnitFilter - Save Data Table Value (Unit Group) —
void
— DataTableSetUnitGroup - Save Data Table Value (Unit Reference) —
void
— DataTableSetUnitRef - Save Data Table Value (Wave) —
void
— DataTableSetWave - Save Data Table Value (Wave Info) —
void
— DataTableSetWaveInfo - Save Data Table Value (Wave Target) —
void
— DataTableSetWaveTarget
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition02.sc2map/MapScript.galaxy:731
// Automatic Variable Declarations
// Implementation
DataTableSetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))), lp_shuttles);
DataTableSetUnit(true, ("EscortShuttle_" + IntToString(UnitGetTag(lp_escort))), UnitGroupUnit(lp_shuttles, 1));
DataTableSetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(UnitGroupUnit(lp_shuttles, 1)))), lp_allEscorts);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zexpedition02.sc2map/MapScript.galaxy:733
DataTableSetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))), lp_shuttles);
DataTableSetUnit(true, ("EscortShuttle_" + IntToString(UnitGetTag(lp_escort))), UnitGroupUnit(lp_shuttles, 1));
DataTableSetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(UnitGroupUnit(lp_shuttles, 1)))), lp_allEscorts);
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition02.sc2map — MapScript.galaxy:731
// Automatic Variable Declarations
// Implementation
DataTableSetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))), lp_shuttles);
DataTableSetUnit(true, ("EscortShuttle_" + IntToString(UnitGetTag(lp_escort))), UnitGroupUnit(lp_shuttles, 1));
DataTableSetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(UnitGroupUnit(lp_shuttles, 1)))), lp_allEscorts);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition02.sc2map — MapScript.galaxy:733
DataTableSetUnitGroup(true, ("EscortShuttles_" + IntToString(UnitGetTag(lp_escort))), lp_shuttles);
DataTableSetUnit(true, ("EscortShuttle_" + IntToString(UnitGetTag(lp_escort))), UnitGroupUnit(lp_shuttles, 1));
DataTableSetUnitGroup(true, ("ShuttleEscorts_" + IntToString(UnitGetTag(UnitGroupUnit(lp_shuttles, 1)))), lp_allEscorts);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1196
PointSetFacing(lv_dropLocation, PointGetFacing(lp_location));
lv_dropUnits = UnitGroupCopy(lp_units);
DataTableSetUnitGroup(false, libSwaC_gf__LastDroppedUnitsDataTableName(), lv_dropUnits);
autoAA5D5DC6_val = lp_race;
if (autoAA5D5DC6_val == libSwaC_ge_DropPodRace_Terran) {
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1232
libSwaC_gv__TP_ZergDropPod_Building = UnitLastCreated();
libNtve_gf_ShowHideUnit(UnitLastCreated(), false);
DataTableSetUnitGroup(false, libSwaC_gf__LastDroppedUnitsDataTableName(), UnitLastCreatedGroup());
auto0E9D82BE_val = lp_waitDontWait;
if (auto0E9D82BE_val == true) {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3222
PointSetFacing(lv_dropLocation, PointGetFacing(lp_location));
lv_dropUnits = UnitGroupCopy(lp_units);
DataTableSetUnitGroup(false, libVCMI_gf_PM_DropPod_LastDroppedUnitsDataTableName(), lv_dropUnits);
auto30FEF00B_val = lp_race;
if (auto30FEF00B_val == libVCMI_ge_DropPodRace_Terran) {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3258
libVCMI_gv_pM_DropPod_TP_ZergBuilding = UnitLastCreated();
libNtve_gf_ShowHideUnit(UnitLastCreated(), false);
DataTableSetUnitGroup(false, libVCMI_gf_PM_DropPod_LastDroppedUnitsDataTableName(), UnitLastCreatedGroup());
autoFAF09496_val = lp_waitDontWait;
if (autoFAF09496_val == true) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:4585
// Automatic Variable Declarations
// Implementation
DataTableSetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Entrances_C), lp_entrances);
DataTableSetRegion(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_Underworld_C), lp_underworld);
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapUnderworldOpen_C, libGame_gv_eventParam_MapUnderworldOpen_TotalSkull_C), lp_totalSkull);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:4926
// Automatic Variable Declarations
// Implementation
DataTableSetUnitGroup(false, TriggerEventParamName(libGame_gv_eventID_MinionGroupCreated_C, libGame_gv_eventParam_MinionGroupCreated_C), lp_unitGroup);
TriggerSendEvent(libGame_gv_eventID_MinionGroupCreated_C);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/HeroesLib.galaxy:3403
// Automatic Variable Declarations
// Implementation
DataTableSetUnitGroup(true, libCore_gf__UnitDataName(libCore_ge__UnitDataType_UnitGroup, lp_unit, lp_index), lp_value);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:3395
PointSetFacing(lv_dropLocation, PointGetFacing(lp_location));
lv_dropUnits = UnitGroupCopy(lp_units);
DataTableSetUnitGroup(false, libNCMI_gf_NM_DropPod_LastDroppedUnitsDataTableName(), lv_dropUnits);
auto30FEF00B_val = lp_race;
if (auto30FEF00B_val == libNCMI_ge_DropPodRace_Terran) {
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:3430
libNCMI_gv_NM_DropPod_TP_ZergBuilding = UnitLastCreated();
libNtve_gf_ShowHideUnit(UnitLastCreated(), false);
DataTableSetUnitGroup(false, libNCMI_gf_NM_DropPod_LastDroppedUnitsDataTableName(), UnitLastCreatedGroup());
autoFAF09496_val = lp_waitDontWait;
if (autoFAF09496_val == true) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:2110
}
libCOMI_gf_CM_CoopAI_AttackForce_ClearTable();
DataTableSetUnitGroup(libCOMI_gv_cMC_CoopAI_AttackForce_DataTableScope, libCOMI_gf_CM_CoopAI_AttackForce_ForceName(), lv_attackForce);
DataTableSetPoint(libCOMI_gv_cMC_CoopAI_AttackForce_DataTableScope, libCOMI_gf_CM_CoopAI_AttackForce_GatherPointName(), lp_spawnLocation);
if ((lp_dropWarpin == true)) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:2198
}
libCOMI_gf_CM_CoopAI_AttackForce_ClearTable();
DataTableSetUnitGroup(libCOMI_gv_cMC_CoopAI_AttackForce_DataTableScope, libCOMI_gf_CM_CoopAI_AttackForce_ForceName(), lv_attackForce);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:11202
PointSetFacing(lv_dropLocation, PointGetFacing(lp_location));
lv_dropUnits = UnitGroupCopy(lp_units);
DataTableSetUnitGroup(false, libCOMI_gf_CM_DropPod_LastDroppedUnitsDataTableName(), lv_dropUnits);
auto30FEF00B_val = lp_race;
if (auto30FEF00B_val == libCOMI_ge_DropPodRace_Terran) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:11238
libCOMI_gv_cM_DropPod_TP_ZergBuilding = UnitLastCreated();
libNtve_gf_ShowHideUnit(UnitLastCreated(), false);
DataTableSetUnitGroup(false, libCOMI_gf_CM_DropPod_LastDroppedUnitsDataTableName(), UnitLastCreatedGroup());
autoFAF09496_val = lp_waitDontWait;
if (autoFAF09496_val == true) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2776
UnitGroupAddUnitGroup(lv_attackUnits, UnitLastCreatedGroup());
}
DataTableSetUnitGroup(true, ("CT_GiftAtk_" + IntToString(UnitGetTag(lp_gift))), lv_attackUnits);
AISetGroupScriptControlled(lv_attackUnits, false);
auto399DB06C_g = lv_attackUnits;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:5121
UnitGroupAdd(lv_scoreGroup, lp_trackedUnit);
DataTableSetString(true, ("CC_ScoreType_" + IntToString(libCOOC_gv_cC_ScoreTrackedDmgTakenCount)), (lp_scoreType));
DataTableSetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(libCOOC_gv_cC_ScoreTrackedDmgTakenCount)), lv_scoreGroup);
TriggerEnable(libCOOC_gt_CC_ScoreDynDmgTaken, true);
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:884
PointSetFacing(lv_dropLocation, PointGetFacing(lp_location));
lv_dropUnits = UnitGroupCopy(lp_units);
DataTableSetUnitGroup(false, libA3DDD02B_gf__LastDroppedUnitsDataTableName(), lv_dropUnits);
autoAA5D5DC6_val = lp_race;
if (autoAA5D5DC6_val == libA3DDD02B_ge_DropPodRace_Terran) {
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:920
libA3DDD02B_gv__TP_ZergDropPod_Building = UnitLastCreated();
libNtve_gf_ShowHideUnit(UnitLastCreated(), false);
DataTableSetUnitGroup(false, libA3DDD02B_gf__LastDroppedUnitsDataTableName(), UnitLastCreatedGroup());
auto0E9D82BE_val = lp_waitDontWait;
if (auto0E9D82BE_val == true) {