Adding a quest¶
Overview¶
In this tutorial, you will learn how to:
- Add quests to the quest pool
- Attach the dialogue to a non-character player (NPC)
- Trigger the conversation in the game
Preparing quests¶
-
In the Explorer window, add quests to the quest pool by choosing Gameplay > + New Quest.
-
Populate the quest information and make it a MonsterKill quest.
Property Description Quest name The name of the quest Type There are four quest types, including: - MonsterKill. To accomplish the MonsterKill task, players need to kill monsters.
- ItemCollect. To accomplish the ItemCollect task, players need to collect enough items.
- Narrative
- PointReach. To accomplish the PointReach task, players need to reach the preset point.
Quest sketch Describes the quest briefly -
Set up a requirement and a reward for the quest.
Property Description Target For the MonsterKill type, the target of the quest is a monster; for the ItemCollect type, the target is the item to collect; for the Narrative type, the target is the preset NPC; for the PointReach type, the target is the destination point to reach. Reward The item to reward players with when they accomplish quests
Creating an NPC and attaching the quest to it¶
-
Find a model in Asset Library and place it in the scene.
-
Make the model a NPC by attaching a Character component to it.
-
Attach the quest to the NPC by adding the Quest component and select a quest from the quest pool.
Adding a trigger for the quest¶
- On the pane of the Dialogue component, set the trigger for the conversation. The default condition of the trigger is self-trigger on start.
-
Set the trigger condition to Touched by player. You can also try another condition and see how it works in your Space.
-
Now you can playtest it by switching to Play Mode.