Force a state in BT from outside

SlaughterWare

New member
Hello, I have the problem I need to test the AI in some condition that is not very practical to have without a huge editing on many parts of the game so I wanted to know if you can force a specific state from outside (Example we have a sequence A B C D and conditions A and B are very hard to provoke so I want to just say "for once skip A and B and check directly C, if that is good proceed otherwise don't care, just do normal behaviour)
Otherwise what is the "best practice" for testing such things.
(I remark I don't want the AI to do so in general, I know how to interact from outside, I just want to test parts of it without changing the whole core and adding tons of unit test kind of stuff to the BT)

Thank you
 
Behavior Designer implements the standard behavior tree implementation which does not allow you to transition to a specific node outside of the behavior tree flow. Implementing a direct transition would have many side effects on conditional aborts, interruptions, and parallel tasks.

For your specific scenario you could modify the conditional task to include an exception when it should return true. You could place this within UNITY_EDITOR so it doesn't run in the build.
 
Top