Background for Fallout 4
Member of the Quest script
boolfunctionModObjectiveGlobal(floatafModValue, GlobalVariableaModGlobal, intaiObjectiveID=-1, floatafTargetValue=-1, boolabCountingUp=true, boolabCompleteObjective=true, boolabRedisplayObjective=true, boolabAllowRollbackObjective=false)

[DEV SERVER] Loading description...


Caveats


Parameters

floatafModValue

CK Wiki Description

The value to add to aModGlobal

GlobalVariableaModGlobal

CK Wiki Description

The global variable we are modifying

intaiObjectiveID=-1

CK Wiki Description

ObjectiveID to redisplay whenever this function is called.

  • Default:-1 (no objective)

floatafTargetValue=-1

CK Wiki Description

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)

boolabCountingUp=true

CK Wiki Description

True to count up to target value, false to count down

  • Default:true

boolabCompleteObjective=true

CK Wiki Description

True to complete the objective when target value is reached, false to fail the objective.

  • Default:true

boolabRedisplayObjective=true

CK Wiki Description

True to re-display the objective every time the function is called, false to only show on success/failure.

  • Default:true

boolabAllowRollbackObjective=false

CK Wiki Description

True to re-open a completed objective

  • Default:false

Examples

; Adds 1 to MyGlobal
MyQuest.ModObjectiveGlobal(1, MyGlobal)
; Adds 1 to MyGlobal, updates objective 10
MyQuest.ModObjectiveGlobal(1, MyGlobal, 10)
; adds 1 to ExteriorDefenderDeadCount, updates objective 30, sets stage 60 when it reaches ExteriorDefenderTotal
if MyQuest.ModObjectiveGlobal(1, ExteriorDefenderDeadCount, 30, ExteriorDefenderTotal.value)
  SetStage(60)
endif

Auto-Generated Example

float myFloat__afModValue
GlobalVariable myGlobalVariable__aModGlobal
int myInt__aiObjectiveID
float myFloat__afTargetValue
bool myBool__abCountingUp
bool myBool__abCompleteObjective
bool myBool__abRedisplayObjective
bool myBool__abAllowRollbackObjective

bool returnedValue = myQuest__toCallFunctionOn.ModObjectiveGlobal(myFloat__afModValue, myGlobalVariable__aModGlobal, myInt__aiObjectiveID, myFloat__afTargetValue, myBool__abCountingUp, myBool__abCompleteObjective, myBool__abRedisplayObjective, myBool__abAllowRollbackObjective)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.