Hi, I'm using Yarn 2 in Unity to build a dialogue, with an interface that has a 3D coin to switch to "investigate" mode when talking to an NPC. In Yarn, I mark special responses (like accusations) with a tag, and want to display them via this coin, separate from the regular response buttons.
I've overridden SetResponseButtons() to handle it, but am having trouble integrating special responses into the dialogue system's cleanup and triggers — either they are excluded, or not properly managed.
How should I handle this special response so that it:
Displays separately with its own UI (3D coin),
Still works normally with the dialogue system (select, cleanup, trigger)? Thanks.
Handling Special Responses in Yarn 2
Re: Handling Special Responses in Yarn 2
Hi,
It might be easier to define two separate menu panels (with their own StandardUIMenuPanel components) in your dialogue UI. Assign the default one to the StandardDialogueUI component's Default Menu Panel field and both of them to the Menu Panels list with the default one first (index 0) and the 3D coin second (index 1).
Then, when you want to use the 3D coin menu panel, include this at the end of the previous line: (more info)
This uses the SetMenuPanel() sequencer command to tell the actor named actorName to use the menu panel with index 1 in the Menu Panels list.
If you want to continue with your overridden SetResponseButtons() method, would you please clarify what cleanup should be done and what's not currently being done?
It might be easier to define two separate menu panels (with their own StandardUIMenuPanel components) in your dialogue UI. Assign the default one to the StandardDialogueUI component's Default Menu Panel field and both of them to the Menu Panels list with the default one first (index 0) and the 3D coin second (index 1).
Then, when you want to use the 3D coin menu panel, include this at the end of the previous line: (more info)
Code: Select all
[seq="SetMenuPanel(actorName, 1)"]
If you want to continue with your overridden SetResponseButtons() method, would you please clarify what cleanup should be done and what's not currently being done?