Random Dragon

Events

Custom Quest makes use of unitys event system in order to make it easier for you use the system. 

 

Events, which events can your system listen for?

Having an event system to listen for the events in Custom Quest might make it easier for you to use Custom Quest with you game, if this is what you prefer, here is a list of the current events used in custom quest

 

Quest Events

Custom Quest calls out at specific times in the quests lifetime, you are able to use an event system to to react to these events

 

Quest objects spawned
When new objects are spawned for the quest criteria.

 

Give reward
When a reward is given to the player for completing a quest.

 

Quest completed
When the entire quest is completed used to update ui and make sure the proper player

 

Quest failed
When a quest is failed by a player,

 

Reward listener
If you prefer using a listener as a separate component instead of a part of either CQUnit or CQPlayer the you can ad the CQRewardListener as a component to your object.

 

UI events

Custom quest contains an optional UI setup, if you would like to use your own ui but make use of the pre made events to keep your ui up to date with your quests.

 

Reset quests in list
Used to keep the quest list clean, run whenever quests are removed from the quest list.

 

Update quest tracker
Used when new quests are activated and/or quests are completed in order to keep the quest compass synchronized.

 

Criterion progress
When a criterion has progressed in any way, used in the UI to keep the UI elements up to date with the player’s progress.

 

Criteria completed
When a criteria is completed, for updating the the UI elements, which player completed.

 

Criteria failed
When a criteria is failed

 

Start quest pop up
When a quest pop up should become active in the game for the player to accept or deny the quest.

 

Method calls

Alternately you can use the event system to call methods using the following methods:

 

QuestCompleted
Call this Method, and give the needed info to make a quest completed.

 

CriteraProgress
Call this method to tell the desired Criteria about the progress.

 

GiveReward
Call this method to give the player a reward, when finishing the quest.

 

ResetQuestEvent
Call this method to reset the quest event.

 

UpdateQuestTracker
Call this method to update the “compass” quest tracker.

 

StartQuestPopUp
Call this method if you want the quest to make a popup, when starting.