After initiating a conversation, an invisible object spawns on the scene, which plays this conversation as its animation. To control the UI and the flow of the conversation, I wrote several state machine components:
Statement - displays what the NPC says.

Chose - shows dialogue options. The available options may depend on the player's attribute level (strength in this case) or the stage of the quest.

If Quest - controls the course of the conversation depending on the stage of the quest.

Set Quest - changes the stage of a given quest.

There is also a randomizer component, but it is not used in this case.

0 comments