Pagina's

Thursday 2 May 2019

A quest in its own right

So I'm implementing quests in my game and since I had been quiet for a while, I'll start with a cheap joke: that's a quest in its own right. It looks like it's taking shape, but it's all looks now.


The first thing I needed to do is have the game understand there's such a thing as a quest, which is now actually nothing more than a class with a couple of strings to contain text. Most of the text is for  dialogs, so I created a dialog handler that can show whatever you want to show in a dedicated dialog window when the rest of the GUI is hidden.

Quests are connected to WorldObjects via a script so that when you interact with that object, it'll view the dialog box. That's kind of all I did tonight. What I'm going to do next is make this a real exchange. There's a couple of lines the NPC can speak, depending on the status of the quest, but that status will never change. For that, I need to have the player actually get the quest. Getting it will change the status. 

Next, I want to add mechanics to the quest so that it has objectives. A delivery quest, like this one, needs to have information on what the NPC wants to have delivered. In this case, the red ball. Furthermore, finding the red ball should change the status of the objective so that when I return to the NPC, it'll be able to decide what to say. A lot of stuff.

And... I need to get the NPC to respect me enough to stop patrolling when we're talking and maybe other NPC's to wait for the dialog to complete before doing their things. 

No comments:

Post a Comment