Mod:Creation Kit/ModObjectiveGlobal - Quest

Member of: Mod:Creation Kit/Quest Script

Mods a global variable in a threadsafe way. Optional parameters allow automatic redisplay and completion (or failure) of a quest objective using this global variable.

Parameters

 * afModValue: The value to add to aModGlobal
 * aModGlobal: The global variable we are modifying
 * aiObjectiveID: ObjectiveID to redisplay whenever this function is called.
 * Default: -1 (no objective)
 * afTargetValue: Value you're counting up (or down) towards -- if you pass in a non-negative number, function will return TRUE when the global reaches the target value
 * Default: -1.0 (no target value)
 * abCountingUp: True to count up to target value, false to count down
 * Default: true
 * abCompleteObjective: True to complete the objective when target value is reached, false to fail the objective.
 * Default: true
 * abRedisplayObjective: True to re-display the objective every time the function is called, false to only show on success/failure.
 * Default: true
 * abAllowRollbackObjective: True to re-open a completed objective
 * Default: false

Return Value
True, if there is a target value and the global value reaches the target value.