# Value From Data Table (Timer)
Grammar — name from the scope|Global/Local data table
Flags —Native
|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> — Scopestring
— Name
Returns — timer
native timer DataTableGetTimer(bool global, string name);
# Related
Category: Data Table / Load Value
- Value From Data Table (Ability Command) —
abilcmd
— DataTableGetAbilCmd - Value From Data Table (Actor) —
actor
— DataTableGetActor - Value From Data Table (Actor Scope) —
actorscope
— DataTableGetActorScope - Value From Data Table (AI Filter) —
aifilter
— DataTableGetAIFilter - Value From Data Table (Bank) —
bank
— DataTableGetBank - Value From Data Table (Boolean) —
bool
— DataTableGetBool - Value From Data Table (Byte) —
byte
— DataTableGetByte - Value From Data Table (Camera Object) —
camerainfo
— DataTableGetCameraInfo - Value From Data Table (Cinematic) —
int
<cinematic> — DataTableGetCinematic - Value From Data Table (Color) —
color
— DataTableGetColor - Value From Data Table (Control) —
int
<control> — DataTableGetControl - Value From Data Table (Conversation) —
int
<conversation> — DataTableGetConversation - Value From Data Table (Conversation Reply) —
int
<reply> — DataTableGetReply - Value From Data Table (Dialog) —
int
<dialog> — DataTableGetDialog - Value From Data Table (Dialog Item) —
int
<control> — libNtve_gf_ValueFromDataTableDialogItem - Value From Data Table (Difficulty Level) —
int
<difficulty> — libNtve_gf_ValueFromDataTableDifficultyLevel - Value From Data Table (Doodad) —
doodad
— DataTableGetDoodad - Value From Data Table (Integer) —
int
— DataTableGetInt - Value From Data Table (Marker) —
marker
— DataTableGetMarker - Value From Data Table (Objective) —
int
<objective> — DataTableGetObjective - Value From Data Table (Order) —
order
— DataTableGetOrder - Value From Data Table (Ping) —
int
<ping> — DataTableGetPing - Value From Data Table (Planet) —
int
<planet> — DataTableGetPlanet - Value From Data Table (Player Color) —
int
<playercolor> — libNtve_gf_ValueFromDataTablePlayerColor - Value From Data Table (Player Group) —
playergroup
— DataTableGetPlayerGroup - Value From Data Table (Point) —
point
— DataTableGetPoint - Value From Data Table (Portrait) —
int
<portrait> — DataTableGetPortrait - Value From Data Table (Real) —
fixed
— DataTableGetFixed - Value From Data Table (Region) —
region
— DataTableGetRegion - Value From Data Table (Revealer) —
revealer
— DataTableGetRevealer - Value From Data Table (Sound) —
sound
— DataTableGetSound - Value From Data Table (Sound Link) —
soundlink
— DataTableGetSoundLink - Value From Data Table (String) —
string
— DataTableGetString - Value From Data Table (Text) —
text
— DataTableGetText - Value From Data Table (Text Tag) —
int
<preset::TextTag> — libNtve_gf_ValueFromDataTableTextTag - Value From Data Table (Timer) —
timer
— DataTableGetTimer - Value From Data Table (Transmission) —
int
<transmission> — DataTableGetTransmission - Value From Data Table (Transmission Source) —
transmissionsource
— DataTableGetTransmissionSource - Value From Data Table (Trigger) —
trigger
— DataTableGetTrigger - Value From Data Table (Unit) —
unit
— DataTableGetUnit - Value From Data Table (Unit Filter) —
unitfilter
— DataTableGetUnitFilter - Value From Data Table (Unit Group) —
unitgroup
— DataTableGetUnitGroup - Value From Data Table (Unit Reference)
- Value From Data Table (Wave) —
wave
— DataTableGetWave - Value From Data Table (Wave Info) —
waveinfo
— DataTableGetWaveInfo - Value From Data Table (Wave Target) —
wavetarget
— DataTableGetWaveTarget
# Examples
mods/starcoop/starcoop.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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);