# Value From Data Table (Timer)

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

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

native timer DataTableGetTimer(bool global, string name);

Category: Data Table / Load Value

# Examples

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

    // Automatic Variable Declarations
    // Implementation
    if ((DataTableGetTimer(true, libCOOC_gf_CS_ObjectiveTableString(lp_objective)) != lp_timer)) {
        DataTableSetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective), lp_timer);
        libCOMI_gf_CM_UpdateObjectiveTimerCampaign(lp_objective);

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


    // Implementation
    lv_timerCurrent = DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective));
    while ((libCOMI_gf_GameIsOver() == false) && (lv_timerCurrent == DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective)))) {
        lv_timerCurrent = DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective));

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

    // Implementation
    lv_timerCurrent = DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective));
    while ((libCOMI_gf_GameIsOver() == false) && (lv_timerCurrent == DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective)))) {
        lv_timerCurrent = DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective));
        auto3EF0D545_val = ObjectiveGetState(libCOOC_gf_CS_GetObjectiveForData(lp_objective));

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

    lv_timerCurrent = DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective));
    while ((libCOMI_gf_GameIsOver() == false) && (lv_timerCurrent == DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective)))) {
        lv_timerCurrent = DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective));
        auto3EF0D545_val = ObjectiveGetState(libCOOC_gf_CS_GetObjectiveForData(lp_objective));
        if (auto3EF0D545_val == c_objectiveStateActive) {

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

        if (auto3EF0D545_val == c_objectiveStateActive) {
            lv_name = TextReplaceWord(UserDataGetText("MissionObjective", libCOOC_gf_CS_ObjectiveUserDataInstance(lp_objective), "FormatText", 1), StringExternal("Param/Value/lib_COMI_4D91C023"), libCOOC_gf_MissionObjectiveName(lp_objective), c_stringReplaceAll, c_stringCase);
            if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) > 0.0)) {
                if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) <= DataTableGetInt(true, (libCOMI_gf_CM_ObjectiveTimer(lp_objective) + "_" + libCOMI_ge_ObjectiveTimerThresholds_Ident(libCOMI_ge_ObjectiveTimerThresholds_Red))))) {
                    lv_name = TextReplaceWord(lv_name, StringExternal("Param/Value/lib_COMI_251B217F"), TextWithColor(TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), Color(100.00, 0.00, 0.00)), c_stringReplaceAll, c_stringCase);

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

            lv_name = TextReplaceWord(UserDataGetText("MissionObjective", libCOOC_gf_CS_ObjectiveUserDataInstance(lp_objective), "FormatText", 1), StringExternal("Param/Value/lib_COMI_4D91C023"), libCOOC_gf_MissionObjectiveName(lp_objective), c_stringReplaceAll, c_stringCase);
            if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) > 0.0)) {
                if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) <= DataTableGetInt(true, (libCOMI_gf_CM_ObjectiveTimer(lp_objective) + "_" + libCOMI_ge_ObjectiveTimerThresholds_Ident(libCOMI_ge_ObjectiveTimerThresholds_Red))))) {
                    lv_name = TextReplaceWord(lv_name, StringExternal("Param/Value/lib_COMI_251B217F"), TextWithColor(TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), Color(100.00, 0.00, 0.00)), c_stringReplaceAll, c_stringCase);
                }

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

            if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) > 0.0)) {
                if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) <= DataTableGetInt(true, (libCOMI_gf_CM_ObjectiveTimer(lp_objective) + "_" + libCOMI_ge_ObjectiveTimerThresholds_Ident(libCOMI_ge_ObjectiveTimerThresholds_Red))))) {
                    lv_name = TextReplaceWord(lv_name, StringExternal("Param/Value/lib_COMI_251B217F"), TextWithColor(TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), Color(100.00, 0.00, 0.00)), c_stringReplaceAll, c_stringCase);
                }
                else {

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

                }
                else {
                    if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) <= DataTableGetInt(true, (libCOMI_gf_CM_ObjectiveTimer(lp_objective) + "_" + libCOMI_ge_ObjectiveTimerThresholds_Ident(libCOMI_ge_ObjectiveTimerThresholds_Yellow))))) {
                        lv_name = TextReplaceWord(lv_name, StringExternal("Param/Value/lib_COMI_A59236C2"), TextWithColor(TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), Color(100.00, 100.00, 0.00)), c_stringReplaceAll, c_stringCase);
                    }

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

                else {
                    if ((TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))) <= DataTableGetInt(true, (libCOMI_gf_CM_ObjectiveTimer(lp_objective) + "_" + libCOMI_ge_ObjectiveTimerThresholds_Ident(libCOMI_ge_ObjectiveTimerThresholds_Yellow))))) {
                        lv_name = TextReplaceWord(lv_name, StringExternal("Param/Value/lib_COMI_A59236C2"), TextWithColor(TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), Color(100.00, 100.00, 0.00)), c_stringReplaceAll, c_stringCase);
                    }
                    else {

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

                    }
                    else {
                        lv_name = TextReplaceWord(lv_name, StringExternal("Param/Value/lib_COMI_6CC50938"), TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), c_stringReplaceAll, c_stringCase);
                    }
                }

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

    libCOMU_gf_CT_RegisterSpawnedUnit(UnitLastCreated());
    DataTableSetTimer(true, ("RiftTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount)), TimerCreate());
    TimerStart(DataTableGetTimer(true, ("RiftTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount))), libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_forPlayer), 90.0, 70.0, 45.0, 30.0, 30.0, 30.0), false, c_timeAI);
    DataTableSetTimer(true, ("RiftTrickleTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount)), TimerCreate());
    TimerStart(DataTableGetTimer(true, ("RiftTrickleTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount))), libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_forPlayer), 20.0, 18.0, 13.0, 10.0, 10.0, 10.0), false, c_timeAI);

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

    TimerStart(DataTableGetTimer(true, ("RiftTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount))), libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_forPlayer), 90.0, 70.0, 45.0, 30.0, 30.0, 30.0), false, c_timeAI);
    DataTableSetTimer(true, ("RiftTrickleTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount)), TimerCreate());
    TimerStart(DataTableGetTimer(true, ("RiftTrickleTimer" + IntToString(libCOMU_gv_cT_VoidRiftCount))), libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_forPlayer), 20.0, 18.0, 13.0, 10.0, 10.0, 10.0), false, c_timeAI);
}

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

                lv_tricklePeriod = libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(UnitGetOwner(lv_rift)), 21.0, 18.0, 15.0, 12.0, 12.0, 12.0);
            }
            lv_riftTimer = DataTableGetTimer(true, ("RiftTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))));
            lv_riftTrickleTimer = DataTableGetTimer(true, ("RiftTrickleTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))));
            if ((UnitIsAlive(lv_rift) == false)) {

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

            }
            lv_riftTimer = DataTableGetTimer(true, ("RiftTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))));
            lv_riftTrickleTimer = DataTableGetTimer(true, ("RiftTrickleTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))));
            if ((UnitIsAlive(lv_rift) == false)) {
                libNtve_gf_StopTimer(lv_riftTimer);