# Save Data Table Value (Trigger)

Grammar — Save value as name in the scope|Global/Local data table
FlagsNative | Action

Saves a trigger 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 ] — Scope
  • string — Name
  • trigger — Value

Returns — void

native void DataTableSetTrigger(
	bool global,
	string name,
	trigger val,
);

Category: Data Table / Save Value

# Examples

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L5724
DataTableSetTrigger(true, (lib281DEC45_gv_zSS_ScriptedScenePrefix + (lp_scene)), lp_callback)

# campaigns/voidstory.sc2campaign

VoidCampaignStoryLib.galaxy

// L4545
DataTableSetTrigger(true, (libVCST_gv_pSC_ScriptedScenePrefix + (lp_scene)), lp_callback)

# mods/missionpacks/novacampaign.sc2mod

LibNCST.galaxy

// L3893
DataTableSetTrigger(true, (libNCST_gv_nSC_ScriptedScenePrefix + (lp_scene)), lp_callback)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L275
DataTableSetTrigger(true, ("CT_SD_" + (lp_mutator)), lp_shutdownTrigger)
// L281
DataTableSetTrigger(true, ("CT_IN_" + (lp_mutator)), lp_initTrigger)
// L282
DataTableSetTrigger(true, ("CT_SD_" + (lp_mutator)), lp_shutdownTrigger)