Objectives 1: A basic quest

Often in an adventure game, the player is given tasks that they need to complete - often more than one at a time. Objectives can be used to keep track of such tasks - to help remind them of what needs doing.

In this tutorial, we'll create an Objective with multiple states, and track its progress in a Menu.

For this example, let's imagine the player's task is to slay a dragon. This will consist of the following steps:

  • Get a sword
  • Go to the dragon's lair
  • Slay the dragon

We can define this information in the Inventory Manager's Objectives tab. Click Create new Objective, and give it the Title "Dragon slayer". Optionally, you can add other details like a description and a texture:

The Objective's states are listed underneath. By default, there are two: Started and Completed. These are the minimum necessary states, and cannot be removed. Rename the first state, "Started", to "Get a sword". Then, create two new states - both marked as Active, ordered and named as follows:

With the Objective data all filled in, we can now go about switching between states in our game.

To begin this Objective, we can use the Objective: Set state Action, switching to the "Get a sword" state. This Action should be run at an appropriate time - e.g. when we talk to the King who gives us this quest.

Similar such Actions can be run as the player achieves each step. For example, when they aquire a Sword inventory item, we can switch to the "Go to the dragon's lair" state.

Objectives can be displayed on-screen via an InventoryBox menu element, set to the type "Objectives". Such a menu can be found as part of the default interface, generated when using the New Game Wizard.

If your Menu Manager doesn't have the default Objectives menu, you can copy it from the Default_MenuManager asset file, after assigning it at the top of the Menu Manager.

To display the Objectives menu, use the Menu: Change state Action to run the Turn On Menu command.

In the next tutorial, we'll create a PopUp window that informs the player automatically when an Objective's state is changed.