How to Cast to Behavior Tree Task?

I have been trying for a very long time to cast to a task within a behavior tree from a UI widget. I am not sure what to use as my object reference for the task. The parent to the task is the BTTask Blueprint Base, but I don’t know what to use as an object reference for that. All I need is to be able to cast to the BTTask Blueprint Base successfully. Thank you!

https://drive.google.com/drive/folders/1OxgeA_lAh8xxRF_zrPAs1JKBI_IY94eQ?usp=drive_link

Hi,AFAIK,you can’t access/reference a task in behavior tree.

if you want the AI to change behavior you could access the AI itself and modify its variables/blackboard keys so that it affects the behavior tree branch making it to switch to another task.

Hope it makes sense to you.

thank you for the reply! I’m sorry though, I’m not sure I understand what you mean by that. I would be so grateful if you could give an example of what you mean by that?

What I’m currently trying to do is linking a behavior tree task variable (which choses a character’s displayed emotion) to the UI character widget switcher. But I’m not sure how to connect the BTT variable to the widget switcher variable without casting…

why to think about tasks…not sure if you’re doing something different.

If you want some informations from the AI.you can get the AI and read its variables or blackboard keys.

This is how to get blackboard keys

1 Like