Events

The QT class has multiple events that you can use to register a callback.

Name
Description

onSaveLoaded

A callback for when a save is loaded.

onQuestAccepted

A callback for when a quest is accepted. This accepts 1 argument: the accepted quest (Quest).

onQuestCompleted

A callback for when a quest is completed. This accepts 1 argument: the completed quest (Quest).

onQuestAbandoned

A callback for when a quest is abandoned. This accepts 1 argument: the abandoned quest (Quest).

onQuestFailed

A callback for when a quest is failed. This accepts 1 argument: the failed quest (Quest).

onQuestRequirementsCompleted

A callback for when the requirements of a quest are completed. This accepts 1 argument: the affected quest (Quest).

onQuestStateChanged

A callback for when a quest's state is changed. This accepts 1 argument: the affected quest (Quest).

onRewardsReceived

A callback for when rewards are received. This accepts 1 argument: a list of rewards (List<QTRewardItem>).

onMemorableChoiceMade

A callback for when a memorable choice is made during dialogue. This accepts 1 argument: the choice made (QTChoice).

Example

public class EventExample : MonoBehaviour
{
    private void Awake()
    {
        QT.onQuestAccepted.AddListener(HandleQuestAccepted);
    }

    public void HandleQuestAccepted(Quest quest)
    {
        // Do something...
    }
}

Last updated