Stendhal Quest Editor: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
imported>Hendrik Brummermann
Line 55: Line 55:
== Task 3: Ask the player for a new axe ==
== Task 3: Ask the player for a new axe ==


Let's offer a quest! If the player says ''quest'', the NPC shall ask him for a new axe:
{{TODO|QUEST-trigger, ask question}}

{{TODO|Explain states}}
''I broke my axe. Please, will you get me a new axe?''
{{TODO|Add yes and no answer}}

{{TODO|Graph view}}
But this time, we are waiting for an answer, either ''yes'' or ''no''. We could just add those words as triggers. But that would mean, that we can only ask one yes/no-question.

When the player says ''yes'' or ''no'', the NPC needs to remember that he asked for an axe. This short term memory is achieved by using another state. Any state would do, but per convention there is ''QUEST_OFFERED'' just for this situation.

[[Image:FsmEditor Quest Graph.png]]

To recap: If the player says ''QUEST'', the NPC will transit from ''ATTENDING'' to ''QUEST_OFFERED''. In this state, he will only accept ''YES'' and ''NO'':

[[Image:FsmEditor Quest.png]]

{{TODO: QUEST_OFFERED in source/target states}}


== Task 4: SetQuestAction ==
== Task 4: SetQuestAction ==