Stendhal Quest Editor: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
imported>Hendrik Brummermann
 
(17 intermediate revisions by the same user not shown)
Line 44: Line 44:
Unlike "job", "lumberjack" is not a predefined standard trigger, so it is not in the drop down list. Therefore we have to use the custom trigger field.
Unlike "job", "lumberjack" is not a predefined standard trigger, so it is not in the drop down list. Therefore we have to use the custom trigger field.


== Aside: The graph view ==
== The graph view ==


In the next section, we will have a look at asking questions and reacting to answer. But before we go there, we should have a look at the <nowiki>[Graph]</nowiki>-page:
In the next section, we will have a look at asking questions and reacting to answer. But before we go there, we should have a look at the <nowiki>[Graph]</nowiki>-page:
Line 50: Line 50:
[[Image:FsmEditor Simple Graph.png]]
[[Image:FsmEditor Simple Graph.png]]


You can see a red box in the middle labelled ''ATTENDING''. This is a state.
You can see a red box in the middle labeled ''ATTENDING''. This is called a state. Will will look at them in detail in the next section.


Linked to the ''ATTENDING'' state there are the two interaction, which we have defined earlier.
We see the two triggers ''JOB'' and ''lumberjack'' on either side of ''ATTENDING''. They are called transitions because in principle they can change the current state. But for now, we only have one single state. So they both start and end in ''ATTENDING''.


If a NPC is in state ATTENDING and the player says one of those triggers, the interaction will be executed and the NPC will reply.
If you point the mouse cursor at a transition, you can see a box on the right with detailed information.

If you point the mouse cursor at an interaction, you can see a box on the right with detailed information.


== Task 3: Ask the player for a new axe ==
== Task 3: Ask the player for a new axe ==
Line 68: Line 70:
[[Image:FsmEditor Quest Graph.png]]
[[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'':
As the above graph shows: 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]]
[[Image:FsmEditor Quest.png]]

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


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