Difference between revisions of "Quest Script"

139 bytes added ,  13:58, 20 February 2012
imported>Jlundin
 
imported>Jog
Line 19: Line 19:


== Member Functions ==
== Member Functions ==
*Function [[CompleteAllObjectives - Quest|CompleteAllObjectives]]()
'''Function [[CompleteAllObjectives - Quest|CompleteAllObjectives]]()'''
**Completes all a quests objectives.
*Completes all a quests objectives.
*Function [[CompleteQuest - Quest|CompleteQuest]]()
 
**Flags this quest as completed.
'''Function [[CompleteQuest - Quest|CompleteQuest]]()'''
*Function [[FailAllObjectives - Quest|FailAllObjectives]]()
*Flags this quest as completed.
**Flags all quest objects as failed.
 
*Alias Function [[GetAlias - Quest|GetAlias]](int aiAliasID)
'''Function [[FailAllObjectives - Quest|FailAllObjectives]]()'''
**Obtains the [[Alias Script|Alias]] attached to this quest associated with the specified ID.
*Flags all quest objects as failed.
*int Function [[GetCurrentStageID - Quest|GetCurrentStageID]]()
 
**Obtains the highest completed stage on this quest.
'''Alias Function [[GetAlias - Quest|GetAlias]](int aiAliasID)'''
*int Function [[GetCurrentStageID - Quest|GetStage]]()
*Obtains the [[Alias Script|Alias]] attached to this quest associated with the specified ID.
**Alias for GetCurrentStageID().
 
*bool Function [[IsStageDone - Quest|GetStageDone]](int aiStage)
'''int Function [[GetCurrentStageID - Quest|GetCurrentStageID]]()'''
**Alias for IsStageDone().
*Obtains the highest completed stage on this quest.
*bool Function [[IsActive - Quest|IsActive]]()
 
**Is this quest "active"? (Tracked by the player).
'''int Function [[GetCurrentStageID - Quest|GetStage]]()'''
*bool Function [[IsCompleted - Quest|IsCompleted]]()
*Alias for GetCurrentStageID().
**Returns whether this quest is completed or not.
 
*bool Function [[IsObjectiveCompleted - Quest|IsObjectiveCompleted]](int aiObjective)
'''bool Function [[IsStageDone - Quest|GetStageDone]](int aiStage)'''
**Obtains whether the specified objective is completed or not.
*Alias for IsStageDone().
*bool Function [[IsObjectiveDisplayed - Quest|IsObjectiveDisplayed]](int aiObjective)
 
**Obtains whether the specified objective is displayed or not.
'''bool Function [[IsActive - Quest|IsActive]]()'''
*bool Function [[IsObjectiveFailed - Quest|IsObjectiveFailed]](int aiObjective)
*Is this quest "active"? (Tracked by the player).
**Obtains whether the specified objective is failed or not.
 
*bool Function [[IsRunning - Quest|IsRunning]]()
'''bool Function [[IsCompleted - Quest|IsCompleted]]()'''
**Returns whether this quest is currently running or not.
*Returns whether this quest is completed or not.
*bool Function [[IsStageDone - Quest|IsStageDone]](int aiStage)
 
**Checks to see if the specified stage is done or not.
'''bool Function [[IsObjectiveCompleted - Quest|IsObjectiveCompleted]](int aiObjective)'''
*bool Function [[IsStarting - Quest|IsStarting]]()
*Obtains whether the specified objective is completed or not.
**Returns whether this quest is currently enabled but not running yet.
 
*bool Function [[IsStopping- Quest|IsStopping]]()
'''bool Function [[IsObjectiveDisplayed - Quest|IsObjectiveDisplayed]](int aiObjective)'''
**Returns whether this quest is currently not enabled anymore but still shutting down.
*Obtains whether the specified objective is displayed or not.
*bool Function [[IsStopped- Quest|IsStopped]]()
 
**Returns whether this quest is currently fully stopped.
'''bool Function [[IsObjectiveFailed - Quest|IsObjectiveFailed]](int aiObjective)'''
*bool Function [[ModObjectiveGlobal - Quest|ModObjectiveGlobal]](float afModValue, GlobalVariable aModGlobal, int aiObjectiveID, float afTargetValue, bool abCountingUp, bool abCompleteObjective, bool abRedisplayObjective)
*Obtains whether the specified objective is failed or not.
**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.
 
*Function [[Reset - Quest|Reset]]()
'''bool Function [[IsRunning - Quest|IsRunning]]()'''
**Resets this quest.
*Returns whether this quest is currently running or not.
*Function [[SetActive - Quest|SetActive]](bool abActive)
 
**Sets or clears this quest as "active". (Tracked by the player)
'''bool Function [[IsStageDone - Quest|IsStageDone]](int aiStage)'''
*bool Function [[SetCurrentStageID - Quest|SetCurrentStageID]](int aiStageID)
*Checks to see if the specified stage is done or not.
**Sets the quest to the requested stage, returning true if it succeeded.
 
*Function [[SetObjectiveCompleted - Quest|SetObjectiveCompleted]](int aiObjective, bool abCompleted)
'''bool Function [[IsStarting - Quest|IsStarting]]()'''
**Sets whether the specified objective is completed or not.
*Returns whether this quest is currently enabled but not running yet.
*Function [[SetObjectiveDisplayed - Quest|SetObjectiveDisplayed]](int aiObjective, bool abDisplayed)
 
**Sets whether the specified objective is displayed or not.
'''bool Function [[IsStopping- Quest|IsStopping]]()'''
*Function [[SetObjectiveFailed - Quest|SetObjectiveFailed]](int aiObjective, bool abFailed)
*Returns whether this quest is currently not enabled anymore but still shutting down.
**Sets whether the specified objective is failed or not.
 
*bool Function [[SetCurrentStageID - Quest|SetStage]](int aiStage)
'''bool Function [[IsStopped- Quest|IsStopped]]()'''
**Alias of SetCurrentStageID().
*Returns whether this quest is currently fully stopped.
*bool Function [[Start - Quest|Start]]()
 
**Starts this quest.
'''bool Function [[ModObjectiveGlobal - Quest|ModObjectiveGlobal]](float afModValue, GlobalVariable aModGlobal, int aiObjectiveID, float afTargetValue, bool abCountingUp, bool abCompleteObjective, bool abRedisplayObjective)'''
*Function [[Stop - Quest|Stop]]()
*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.
**Stops the quest.
 
*bool Function [[UpdateCurrentInstanceGlobal - Quest|UpdateCurrentInstanceGlobal]](GlobalVariable aUpdateGlobal)
'''Function [[Reset - Quest|Reset]]()'''
**Updates the value for the given global for the quest's current instance.
*Resets this quest.
 
'''Function [[SetActive - Quest|SetActive]](bool abActive)'''
*Sets or clears this quest as "active". (Tracked by the player)
 
'''bool Function [[SetCurrentStageID - Quest|SetCurrentStageID]](int aiStageID)'''
*Sets the quest to the requested stage, returning true if it succeeded.
 
'''Function [[SetObjectiveCompleted - Quest|SetObjectiveCompleted]](int aiObjective, bool abCompleted)'''
*Sets whether the specified objective is completed or not.
 
'''Function [[SetObjectiveDisplayed - Quest|SetObjectiveDisplayed]](int aiObjective, bool abDisplayed)'''
*Sets whether the specified objective is displayed or not.
 
'''Function [[SetObjectiveFailed - Quest|SetObjectiveFailed]](int aiObjective, bool abFailed)'''
*Sets whether the specified objective is failed or not.
 
'''bool Function [[SetCurrentStageID - Quest|SetStage]](int aiStage)'''
*Alias of SetCurrentStageID().
 
'''bool Function [[Start - Quest|Start]]()'''
*Starts this quest.
 
'''Function [[Stop - Quest|Stop]]()'''
*Stops the quest.
 
'''bool Function [[UpdateCurrentInstanceGlobal - Quest|UpdateCurrentInstanceGlobal]](GlobalVariable aUpdateGlobal)'''
*Updates the value for the given global for the quest's current instance.


== Events ==
== Events ==
Anonymous user