For the complete documentation index, see llms.txt. This page is also available as Markdown.

Craft Quests

This activity is included in an 8-part, 1 hour series to learn Game Maker. Short, focused topics with guided practice will give you practical experience building useful logic for creating games.

Begin Game Maker 6

Integrate Quests & Objects

🟡 MEDIUM

In this activity, you will learn how to guide players through your gameplay with Objectives, or quests, and icons to help players find quest objects like NPCs, collectable objects, and more.

What are Quests?

Located in the Objectives system, Quests are used to guide players through your game's story, geography, game mechanics, and more with a sleek user interface. Objects in the game world can be linked to quests so they're easier to find.

A quest may be triggered and completed only one time.

Launch Game Maker

  • Open the Experience from the previous activity to reuse some of its logic.

To track individual player progression in single and multiplayer games, [SP] behaviors and components must be used to send messages to the Objectives system.

[MP] logic works like [SP] logic in singleplayer games.

Locked/Unlocked

Open the Objectives window and toggle on quests.

Let's add two quests to compare when they'll appear on the right side of the player screen in the Objectives UI, or user interface. Ignore other quest settings for now.

Name: Auto Quest 1. Unlock quest: Auto Unlock 2. Launch quest: Auto Launch

Name: Triggered Quest 1. Unlock quest: Requires Message Message: DoorA.Open 2. Launch quest: Auto Launch Note: In the last activity, an Ancient Lever object sends this message when players interact with it.

Test

Press TAB to see the "Auto Quest" open at game start.

Interact with the Ancient Lever that sends DoorA.Open to All, which will make the "Triggered Quest" appear in the UI because the quest is set to auto launch.

When to Launch

Modify both quests to require a message to launch:

Name: Auto Quest 1. Unlock quest: Auto Unlock 2. Launch Quest: Requires Message Message: DoorA.Open

Name: Triggered Quest 1. Unlock quest: Requires Message Message: DoorA.Open 2. Launch Quest: Message Required Message: Night Note: In the last activity, a logic asset with a Trigger Volume component sends this message when players enter the volume.

Test

Press TAB to test. Notice that no quests appear in the UI yet.

Try entering the trigger volume (remember that your game will shift to night from the previous activity's settings). The "Triggered Quest" will not launch yet because it is still locked.

Interact with the Ancient Lever asset to send DoorA.Open and you'll make the "Auto Quest" launch in the UI. The "Triggered Quest" is also unlocked by this message.

Now you can enter the trigger volume and launch the "Triggered Quest" in the UI.

Launch settings allow you to control how many quests may be activated at a time, while unlock settings allow you to control when players are permitted to start a quest.

Different Quest Types and Conditions

There are four types of quests: counter, asset death, timer, and wait for message.

First let's set up interactive assets for a counter quest:

Asset name: Ancient Artifact Tag: artifact Remove Predator behaviour

Health component

  • Health: 10

Drop component

  • Assets to Spawn: Ancient Treasure A

  • Components: [SP] Collectable

  • Tags: treasure

Note: Duplicate this asset (5 total)

Counter- Destroy Objects

Create a new quest (auto unlock and launch):

Name: Treasure Hunt Description: "Destroy the ancient artifacts and collect all of the treasure.”

3. Counter

  • Type: death

  • Tag: artifact

  • Amount: 5

Test - The quest counts the number of objects destroyed with the tag you set for it to watch.

Counter - Collect Objects

Modify the quest:

3. Counter

  • Type: collected objects

  • Tag: treasure

  • Amount: 5

Test

Press TAB to test. When you attack and destroy each artifact, nothing happens. When you collect each pile of treasure dropped after each artifact is destroyed, the quest counts the number of objects collected with the tag you set for it to watch.

You can apply the same tag to collect or destroy different types of objects, such as ingredients to make a meal.

Quest States

A quest may be in three states: inactive, in progress, and finished. We can use NPC dialogue to tell players how to start or complete a quest and confirm the quest is finished.

Create an NPC and dialogue:

Asset: Adventurer Jet

Asker behaviour

  • Question: Can you help me find ancient treasure hidden inside the artifacts?

  • Answer 1: Sounds like fun! A1 Message: Q.Treasure.Launch

Toggle behaviour

  • Turn OFF Message: Q.Treasure.Launch

Asset: Logic asset

Asker behaviour

  • Question: Did you find the artifacts yet?

  • Answer 1: I'm still looking for them! A1 Message: Q.Treasure.InProgress

Toggle behaviour

  • Turn ON Message: Q.Treasure.Launch

  • Turn OFF Message: Q.Treasure.InProgress

Asset: Logic asset

Asker behaviour

  • Question: Awesome! You found the treasure!

  • Answer 1: That was a piece of cake!

Toggle behaviour

  • Turn On Message: Q.Treasure.Complete

Now connect the dialogue to timing of the quest:

Name: Treasure Hunt 2. Launch quest: Requires Message Message: Q.Treasure.Launch 5. Action after completion: Requires Message Message: Q.Treasure.Complete

Test

Press TAB to test.

Quest inactive - Interact with the NPC to start the quest. This dialogue is then toggled off by its own message out when you answer the question.

Quest in progress - Interact after the quest is launched to see the dialogue, which can be a helpful reminder for players. No message is needed unless you want to trigger a hint for players.

Quest complete - Interact after the quest is complete to see the dialogue.

Adding Polish with Indicators

You can apply three types of icons to objects that are linked to a quest:

Giver
Objective
Receiver

These icons are displayed above objects in the game world when an Indicator component is applied to the objects, a quest is linked, and quest settings match the type of icon to use.

Modify Jet and the "Treasure Hunt" quest so he can be a quest giver:

Modify Asset: Adventurer Jet

Add an Indicator component Linked quest ID: Treasure Hunt Quest cursors: True

  • Giver: Adventurer Jet

Create a Custom Preset to Drop

Since the tagged object that the quest counts is a dropped item (meaning it is spawned), we'll modify the ancient artifact assets to use a Preset with custom settings that link to a specific quest. You don't need to create a preset for quest items, but we've chosen an example that's a bit more fun for players.

Create an object:

Asset: Ancient Treasure A Tag: treasure

Indicator component

  • Linked Quest ID: Treasure Hunt

  • Quest cursors: True

  • Objective: Treasure Hunter

Collectable component

Save this object as a Preset. This allows you to spawn or place an object or group of objects with more complex custom settings during edit or play modes.

Modify all ancient artifact assets to spawn this preset.

Test

The exclamation point appears above the NPC before the quest starts because it's the quest giver.

After you interact with it, the target icons appear above each quest objective, the ancient artifacts to destroy.

Once you have collect all of the treasure, the icons and quest are no longer visible.

Follow Up

Quests are a great way to guide players through the flow of your Experience. They can be very simple, or they can have complex steps and hints to help players when connected with objects.

  • A Counter quest can be used in different ways to count what players destroy or collect.

  • A Timer quest can be a fun challenge to survive or defend an asset during a time period.

  • An Asset Death quest can be used for a special boss fight.

  • A Wait for Message quest is extremely flexible in use since it only requires a message to complete it.

In the next activity, we'll learn how to create more interesting game mechanics with Game Rules.


Relevant Resources

Cover

Learn what dialogue strings are used for and how they're made


Forum: Community Ideas & Support


Other "Begin Game Maker" Videos

Last updated

Was this helpful?