Referencing a task in a behaviour tree to unlock options for a dialogue tree

Hello there,

I am not quite adept in Unreal Engine and I hope, that maybe someone here can help me out. I implemented a dialogue tree with the help of a behaviour tree. Here I created a custom task, that takes a string as a parameter and an array of a struct (string + bool). The first string will be shown in a widget, which represents the output of a NPC. The array represents the responses the player can give in form of buttons. These buttons are created during runtime and a custom decorater checks the pressed button and then displayes another line of dialogue etc.

Now my problem is, that not all options are available from the get go. The player has to unlock them first. My idea was to set a bool, that represents the “unlock status”. Also, I’ve given each task an ID, so if the player presses a certain button, e.g. button with the ID 003, he will get access to the button with the ID 100. To do this, I need to reference another task within the behaviour tree. My question is, how do I reference another task? Is this even possible? Or is there a way to implement it more easily, without throwing away all of the existing logic completely? I use Blueprints for Logic.

I know it isn’t best practice to misuse a behaviour tree as dialogue tree and simply hard code all required strings, but I thought a few weeks earlier, that it is more straightforward to see, which option appears when.

Here you can see an excerpt from the dialogue tree:

and the parameters:
grafik

At the end of each branch the dialogue tree is started anew until the player wishes to exit the conversation.

Thank you in advance!

Would also like to know!