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.
Documentation Comment
thread-safe way to modify a global value
optional parameters:
aiObjectiveID = objective ID to redisplay
afTargetValue = value you're counting up (or down) towards -- if included, function will return TRUE when the global reaches the target value
abCountingUp = by default, function assumes you're counting up towards the target value; make this false to count DOWN towards target value
abCompleteObjective = by default, function assumes you're completing the objective once you reach the target value; make this false to FAIL the objective
abRedisplayObjective = by default, function asssume you want to redisplay the objective every time the global is incremeneted; make this FALSE to only display the objectives on complete or failure
abAllowRollbackObjective = by default, function assumes you do not want to rollback a completed objective; make this TRUE to reopen an already completed objective if aModGlobal goes below/above target value
; adds 1 to ExteriorDefenderDeadCount, updates objective 30, sets stage 60 when it reaches ExteriorDefenderTotalif MyQuest.ModObjectiveGlobal(1, ExteriorDefenderDeadCount, 30, ExteriorDefenderTotal.value)SetStage(60)endif