Skip to content

Quest Manager

Introduction

Actor responsible for managing quests

API Reference

Properties

Property Description Type Default Value
QuestWidgetClass The widget class used to display the current quest TSubclassOf<UQuestWidget>

Events

Name Description Params
OnQuestCompleted Event used to notify other classes when a quest is completed Quest (UQuest*)
The quest that was completed
OnQuestUpdated Event used to notify other classes when a quest is updated CurrentQuest (UQuest*)
The current active quest

CurrentPoint (UQuest*)
The current point of the active quest

Functions

Name Description Params Return
StartQuest Start the specified quest Quest (UQuest*)
The quest to start
OnQuestPointCompleted Complete the current quest point
GetCurrentQuest Get the current quest UQuest*
The current quest
GetCurrentQuestPo Get the current quest point int
The current quest point
IsQuestActive Check if the specified quest is active Quest (UQuest*)
The quest to check
bool
A boolean value indicating if the quest is active

Blueprint Usage

You can use the QuestManager using Blueprints by adding one of the following nodes:

  • Ultimate Starter Kit > Quests > Start Quest
  • Ultimate Starter Kit > Quests > On Quest Point Completed
  • Ultimate Starter Kit > Quests > Get Current Quest
  • Ultimate Starter Kit > Quests > Get Current Quest Po
  • Ultimate Starter Kit > Quests > Is Quest Active

C++ Usage

Before you can use the plugin, you first need to enable the plugin in your Build.cs file:

PublicDependencyModuleNames.Add("USK");

The QuestManager can now be used in any of your C++ files:

#include "USK/Quests/QuestManager.h"

void ATestActor::Test()
{
    // QuestManager is a pointer to the AQuestManager
    QuestManager->StartQuest(Quest);
    QuestManager->OnQuestPointCompleted();
    UQuest* CurrentQuest = QuestManager->GetCurrentQuest();
    int CurrentQuestPo = QuestManager->GetCurrentQuestPo();
    bool IsQuestActiveValue = QuestManager->IsQuestActive(Quest);
}