DialogueActor component for the instigator in a sub-dialogue tree is not working

NodeCanvas Forums Support DialogueActor component for the instigator in a sub-dialogue tree is not working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16427
    rdt42
    Participant

    I have an agent with a Behavior Tree Owner Component, in which I trigger a Dialogue Tree. The Dialogue Tree is an Asset Graph, but my agent lives in the scene. I’ve added a DialogueActor Component to this agent as well, but when it instigates the Sub Dialogue Tree, there is an error saying there was no DialogueActor component found for the instigator.

    What is the correct approach here to make this work? Is there a way to set these DialogueActors dynamically through code?

    #16440
    Gavalakis
    Keymaster

    Hello there,

    Just to clarify: are you using the “Start Dialogue Tree” action task and if so, have you assigned a prefab dialogue tree gameobject there and checked the “Is Prefab” option in the action, or are you using a custom action that starts an asset dialogue tree graph?

    Please let me know. Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #16447
    rdt42
    Participant

    Hey,

    I was using the SubDialogueTree node (from NestedDT.cs). Creating a prefab with a Dialogue Tree Controller, and linking that in the Start Dialogue Tree Action does indeed use the DialogeActor correctly.

    When would you need to use the NestedDT node?

    Thanks for help!

    #16475
    Gavalakis
    Keymaster

    Hello again and sorry for the late reply.

    The SubDialogueTree node is to be used when your Dialogue Tree is an asset and you want the agent of the Behaviour Tree to be the instigator of that dialogue and the agent already is a Dialogue Actor (has the component), and you also want to parametrize some of the variables of the Dialogue Tree through the variables of the Behaviour Tree (Variables Mapping in the inspector of the SubDialogueTree node).

    The Start Dialogue Action on the other hand is for executing a Dialogue Tree Controller separately (either in the scene, or a prefab) like you did.

    Both ways are totally fine.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.