Stendhal Quest Coding: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
Teaching the NPC to talk
imported>Kymara
finish an unfinished sentence and correct a typo. add another suggestion to teach
Line 68: Line 68:
</source>
</source>


Of course in the case of this tutorial the two lines for BeerForHayunn are alrady there.
Of course in the case of this tutorial the two lines for BeerForHayunn are already there.


== Teaching the NPC to talk ==
== Teaching the NPC to talk ==
Line 74: Line 74:
Okay, we have now completed the preparation. Our first task is to get Hayunn to reply to the word "quest".
Okay, we have now completed the preparation. Our first task is to get Hayunn to reply to the word "quest".


Therefore we add a new method called prepareQuestStep() at the end of the file BeerForHayunn, just above the last closing "}". This method will
Therefore we add a new method called prepareQuestStep() at the end of the file BeerForHayunn, just above the last closing "}". This method makes Hayunn reply to the word "quest" with the answer "My mouth is dry, but I can't be seen to abandon this teaching room!"


<source lang="java">
<source lang="java">
Line 104: Line 104:


* #beer
* #beer
* using predefined trigger sets like YES_MESSAGES


Please make sure this works before advancing to the next section of this tutorial:
Please make sure this works before advancing to the next section of this tutorial: