How to disable/enable a task in an external behavior tree?

rajdpj

New member
I have an external tree that I would like to switch between a seek and flee task based upon a bool setting of fleeTargetGameObject:
1. is it possible to disable the seek task and enable the flee task at runtime if the fleeTargetGameObject is true or enable the seek task and disable the flee task if the fleeTargetGameObject is false? if so what is syntax?
2. do you recommend doing this action calling 2 external trees(seek/flee) via an external tree reference task instead at runtime? if so what is syntax?
I have been doing lots of research to no avail, any help would be greatly appreciated. Thank you in advance for your cooperation.
Behavior_WanderScreenshot.png
 
1. is it possible to disable the seek task and enable the flee task at runtime if the fleeTargetGameObject is true or enable the seek task and disable the flee task if the fleeTargetGameObject is false? if so what is syntax?
Instead of disabling you can use a conditional task to decide if see or flee should run. You should have something like:
Code:
                         Selector
           Sequence                  Flee
(Should Seek?) - Seek

do you recommend doing this action calling 2 external trees(seek/flee) via an external tree reference task instead at runtime? if so what is syntax?
No - the conditional route is probably the best.
 
Top