Learning Objectives

There is one more character we want to place in our game, which is an unquestionably evil, carrot-smashing, monster. Our goal is for this monster to appear after we finish collecting our items. As such, we need to place the character in the editor, hide it, and then continue on building our quest.

You will:

  1. Learn about storing our own properties in variables
  2. Learn to trigger an event for our quest
  3. Learn about game design and accessibility

Warm up (5 minutes)

The Scene Editor itself does not contain any information on abstract concepts like good or evil. As a starting discussion, if the scene editor does not store this information and Quorum does not store it either, how do we keep track of extra information we want?

Trigger the Good Objects (30 minutes)

To start our quest, we need a way for our quest giver non-player character to start its dialog and show the items. Here are the steps we will take in completing this activity

  1. Add a key to our keyboard listener, perhaps the Q key, and make sure that it triggers when we press it.
  2. When a Q key is pressed, get the location of our player character and our non-player character.
  3. Calculate, using the Vector3 action Distance, how far apart the two items are
  4. Once we have the distance, if the distance is less than a value of our choosing, trigger the beginning of the quest
  5. This trigger should make the NPC say something through an output statement
  6. Make the good items show themselves
Here is a link to the Vector3 Reference Page

We should now have the beginning of a quest. We can load up a game, go to a quest giver, and start a quest that lets us go collect items.

Wrap-up (10 minutes)

During the wrap-up, it is important to notice that there are now quite a few objects in our game scene. There is a map behind the scenes, two characters, hidden good items that become visible, and an evil monster that is still invisible. Our game so far is broadly not very accessible, depending on what it means to be accessible. What features might we want in our game to make it more accessible? Consider your answer from at least one of the groups below:

  1. Visual Disabilities
  2. Hearing Disabilities
  3. Physical Disabilities
  4. Learning Disabilities

Next Tutorial

In the next tutorial, we will discuss Add Background Music, which describes finding and adding background music..