Page 2 of 2
Re: Changing a C# script variable or calling a function through a Dialogue Node
Posted: Thu Mar 25, 2021 6:42 pm
by Strig
We're using InControl, along with our own input system based on Player Actions. It was worked to activate with an input we declared as "Interaction". And the Debug I mentioned shows that it is calling the Usable component, but another debug in the Dialogue System Trigger (inside the OnConversationStart function) doesn't get called.
The Sequence of all Start Nodes is "None()", but this wasn't a problem before.
EDIT: The Dialogue System Trigger DOES fire the OnTriggerEnter event in the Console, however.
Re: Changing a C# script variable or calling a function through a Dialogue Node
Posted: Thu Mar 25, 2021 7:01 pm
by Tony Li
Strig wrote: ↑Thu Mar 25, 2021 6:42 pmEDIT: The Dialogue System Trigger DOES fire the OnTriggerEnter event in the Console, however.
Sorry, I may be misunderstanding. When you tell the Usable to "use" the Dialogue System Trigger, is the Dialogue System Trigger set to OnTriggerEnter or OnUse? It will only start the conversation if it's set to OnUse. Also check the Conditions section. Maybe it's failing a Conditions check.
When you start the conversation via FSM, does the first line show up onscreen?
One other thought comes to mind: The Dialogue Manager now has a Display Settings > Canvas field. If the dialogue UI is a prefab that's instantiated at runtime, assign the Canvas that the Dialogue System should instantiate it into.
Re: Changing a C# script variable or calling a function through a Dialogue Node
Posted: Thu Mar 25, 2021 7:22 pm
by Strig
It's set to OnUse, yes. The trigger just detects when the player is in there.
When the conversation is started via FSM, both the Letterbox and the first line in the conversation show up as they should, but I can't progress past that, as if the system isn't reading the inputs from InControl.
As for the Canvas, the Letterbox isn't instantiated at runtime - it's a child of the Canvas that's inside the Dialogue Manager.
Re: Changing a C# script variable or calling a function through a Dialogue Node
Posted: Thu Mar 25, 2021 9:12 pm
by Tony Li
Is the conversation configured to require a continue button click to progress?
Does the game accept mouse input?
If yes to both, keep an Inspector window on the EventSystem. When you mouse over the continue button, does the EventSystem pick it up? If not, maybe another UI element (even a transparent one) is blocking it.
The dialogue UI is primarily just plain old Unity UI. If you can interact with Unity UI, then you should be able to progress the conversation.
If the conversation isn't configured to require a continue button click, is it getting stuck on the first line's Sequence?
At any time, please feel free to send a
reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look.