As far as piping a SubDialogue tree’s variables to the parent Dialogue Tree variables, this can be done through the inspector of the SubDialogue node and in the “Mapping” section. In that inspector section, all variables existing in the sub-dialogue tree local blackboard will be listed and you have the option to map these variables to the variable of the parent dialogue.
In this example bellow, the sub dialogue tree assigned in the SubDialogue node, has 2 local variables, myFloat and myString.
Sub-Tree’s “myString” variable is mapped to the parent/current “myString” variable, while “myFloat” is not mapped and left to NONE.
What will thus happen, is that as soon as the sub dialogue tree is executed, it’s local variables will be set according based on this mapping.
This is very similar to how you would for example set the parameters of a task, but instead in this case we are setting the variables of the subtree.
This way, a dialogue tree asset can easier be reusable in many different parent dialogue trees without relying in having the same parameter names like it was before, but rather by mapping/parametrizing it’s variables.
This is generally, the way I am heading towards the other systems (FSM, BT) to also work as far as SubGraph’s go.
Now, as far as piping the parent FSM blackboard variables to the dialogue tree started by the “Start Dialogue Tree” action, this is indeed not possible and missing, BUT, in the next version there will be a SubDialogue node for FSMs (similar to how there was one in version 1.x), where piping data will work pretty much the same way as explained above. I can actually send you the node before the new version hits the asset store.
Let me know your thoughts on these.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Attachments:
DialogueTreeVariablesMapping.png
Login
Register
By registering on this website you agree to our Privacy Policy.