# Value From Data Table (Unit)

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

Returns a unit 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 — unit

native unit DataTableGetUnit(bool global, string name);

Category: Data Table / Load Value

# Examples

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(true, (libSwaC_gv_zSC_ArmyCustomEggUnitDataPrefix + (lp_armyCategory)));
}

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:5203

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, "%REPLACEDUNIT%");
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:4448

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, "%REPLACEDUNIT%");
}

mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmodbase.stormdata/LibPVEB.galaxy:802

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libPVEB_gv_eventID_NPCHeroSpawn_C, libPVEB_gv_eventParam_NPCHeroSpawn_HeroUnit_C));
}

mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmodbase.stormdata/LibPVEM.galaxy:1009

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libPVEM_gv_pvEEventIDNPCHeroSpawn_C, libPVEM_gv_pvEEventParamNPCHeroSpawnHeroUnit_C));
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:477

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGDHL_gv_eventID_AbathurUltimateEvolutionEnded_C, libGDHL_gv_eventParam_AbathurUltimateEvolution_ClonedUnit_C));
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:530

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGDHL_gv_eventID_AbathurSymbiote_C, libGDHL_gv_eventParam_AbathurSymbiote_SymbioteUnit_C));
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:536

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGDHL_gv_eventID_AbathurSymbiote_C, libGDHL_gv_eventParam_AbathurSymbiote_SymbioteTarget_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_JungleDefenderAIDefenderKilled_C, libGame_gv_eventParam_JungleDefenderAIDefenderKilled_Unit_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInCreepTakedown_C, libGame_gv_eventParam_HeroParticipatedInCreepTakedown_NPC_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroExitedTransport_C, libGame_gv_eventParam_HeroExitedTransport_Transport_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_Transport_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroEnteredTransport_C, libGame_gv_eventParam_HeroEnteredTransport_CargoUnit_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroPortedBackToTown_C, libGame_gv_eventParam_HeroPortedBackToTown_Unit_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInNPCTakedown_C, libGame_gv_eventParam_HeroParticipatedInNPCTakedown_NPC_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroWitnessedAlliedNPCDeath_C, libGame_gv_eventParam_HeroWitnessedAlliedNPCDeath_NPC_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_SpecialCaseUnitParticipatedInNPCTakedown_C, libGame_gv_eventParam_SpecialCaseUnitParticipatedInNPCTakedown_NPC_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(libGame_gv_eventID_HeroParticipatedInTakedown_C, libGame_gv_eventParam_HeroParticipatedInTakedown_HeroKilled_C));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(true, libCore_gf__UnitDataName(libCore_ge__UnitDataType_Unit, lp_unit, lp_index));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(EventGenericName(), "EventHero"));
}

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetUnit(false, TriggerEventParamName(EventGenericName(), "EventStructure"));
}

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

    auto43A95D7E_val = lp_unit;
    if (auto43A95D7E_val == libCOMI_ge_CM_ZeratulProphecyEventUnits_ZeratulUnit) {
        return DataTableGetUnit(false, TriggerEventParamName(EventGenericName(), "ZeratulEventUnit"));
    }
    else if (auto43A95D7E_val == libCOMI_ge_CM_ZeratulProphecyEventUnits_ArtifactUnit) {

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

    }
    else if (auto43A95D7E_val == libCOMI_ge_CM_ZeratulProphecyEventUnits_ArtifactUnit) {
        return DataTableGetUnit(false, TriggerEventParamName(EventGenericName(), "ZeratulEventArtifactUnit"));
    }
    else {

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

    else {
    }
    return DataTableGetUnit(false, TriggerEventParamName(EventGenericName(), "ZeratulEventUnit"));
}

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


    TriggerEnable(TriggerGetCurrent(), false);
    if ((libNtve_gf_UnitInRegion(libCOMI_gv_cM_ZeratulProphecyArtifact, RegionCircle(UnitGetPosition(DataTableGetUnit(false, TriggerEventParamName(("ZeratulEvent_ProphecyCastStart"), "ZeratulEventUnit"))), 14.0)) == false)) {
        libCOMI_gf_CM_CommanderVOSend(libCOMI_gf_CM_ZeratulProphecyEventGetPlayer(), SoundLink("ZeratulCommander_FindArtifact", -1), libCOOC_gf_CC_PlayersOfCommander("ProtossZeratul"));
        Wait(libCOMI_gv_cMC_ZeratulVOTransmissionProphacyCastDelay, c_timeGame);