# Save Data Table Value (Timer)
Grammar — Save value as name in the scope|Global/Local data table
Flags —Native
|Action
Saves a timer 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
— Nametimer
— Value
Returns — void
native void DataTableSetTimer(
bool global,
string name,
timer 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
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:9329
// 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/LibCOMU.galaxy:4251
UnitGroupAdd(libCOMU_gv_cT_VoidRifts, UnitLastCreated());
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());
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:4253
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:11843
libNtve_gf_StopTimer(lv_riftTimer);
libNtve_gf_StopTimer(lv_riftTrickleTimer);
DataTableSetTimer(true, ("RiftTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))), null);
DataTableSetTimer(true, ("RiftTrickleTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))), null);
UnitGroupRemove(libCOMU_gv_cT_VoidRifts, lv_rift);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:11844
libNtve_gf_StopTimer(lv_riftTrickleTimer);
DataTableSetTimer(true, ("RiftTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))), null);
DataTableSetTimer(true, ("RiftTrickleTimer" + IntToString(FixedToInt(UnitGetCustomValue(lv_rift, 0)))), null);
UnitGroupRemove(libCOMU_gv_cT_VoidRifts, lv_rift);
continue;