1,482
edits
imported>Lisselli m (→Syntax: changed value to GetValue() to make the function a little faster.) |
m (Convert source tags to syntaxhighlight) |
||
| Line 6: | Line 6: | ||
== Syntax == | == Syntax == | ||
< | <syntaxhighlight lang="papyrus"> | ||
bool Function ModObjectiveGlobal(float afModValue, GlobalVariable aModGlobal, int aiObjectiveID = -1, float afTargetValue = -1.0, \ | bool Function ModObjectiveGlobal(float afModValue, GlobalVariable aModGlobal, int aiObjectiveID = -1, float afTargetValue = -1.0, \ | ||
bool abCountingUp = true, bool abCompleteObjective = true, bool abRedisplayObjective = true) | bool abCountingUp = true, bool abCompleteObjective = true, bool abRedisplayObjective = true) | ||
| Line 34: | Line 34: | ||
return false | return false | ||
endFunction | endFunction | ||
</ | </syntaxhighlight> | ||
== Parameters == | == Parameters == | ||
| Line 54: | Line 54: | ||
== Examples == | == Examples == | ||
< | <syntaxhighlight lang="papyrus"> | ||
; Adds 1 to MyGlobal | ; Adds 1 to MyGlobal | ||
MyQuest.ModObjectiveGlobal(1, MyGlobal) | MyQuest.ModObjectiveGlobal(1, MyGlobal) | ||
</ | </syntaxhighlight> | ||
<br> | <br> | ||
< | <syntaxhighlight lang="papyrus"> | ||
; Adds 1 to MyGlobal, updates objective 10 | ; Adds 1 to MyGlobal, updates objective 10 | ||
MyQuest.ModObjectiveGlobal(1, MyGlobal, 10) | MyQuest.ModObjectiveGlobal(1, MyGlobal, 10) | ||
</ | </syntaxhighlight> | ||
<br> | <br> | ||
< | <syntaxhighlight lang="papyrus"> | ||
; adds 1 to ExteriorDefenderDeadCount, updates objective 30, sets stage 60 when it reaches ExteriorDefenderTotal | ; adds 1 to ExteriorDefenderDeadCount, updates objective 30, sets stage 60 when it reaches ExteriorDefenderTotal | ||
if MyQuest.ModObjectiveGlobal(1, ExteriorDefenderDeadCount, 30, ExteriorDefenderTotal.value) | if MyQuest.ModObjectiveGlobal(1, ExteriorDefenderDeadCount, 30, ExteriorDefenderTotal.value) | ||
SetStage(60) | SetStage(60) | ||
endif | endif | ||
</ | </syntaxhighlight> | ||
== See Also == | == See Also == | ||
*[[Quest Script]] | *[[Quest Script]] | ||
*[[UpdateCurrentInstanceGlobal - Quest]] | *[[UpdateCurrentInstanceGlobal - Quest]] | ||