Mod:Creation Kit/UpdateCurrentInstanceGlobal - Quest

Member of: Mod:Creation Kit/Quest Script

Attempts to update the stored value of the given global in the instance data for the quest's current instance. The function only returns false on failure which can be caused by calling the function when there is no active instance on the quest or by passing a global not in the quest's text global list.

Syntax
bool Function UpdateCurrentInstanceGlobal(GlobalVariable aUpdateGlobal) native

Parameters

 * aUpdateGlobal: The global on the quest whose cached value should be reset to its current value.

Return Value
True, if the global value is successfully updated, false if it is not.

Examples
if (!UpdateCurrentInstanceGlobal(GameHour)) Debug.Trace("Failed to update GameHour value for quest") endIf
 * Attempts to update the current instance of the GameHour global variable - and logs a message if it fails