I have a behavior tree that has 4 decorators.
- The AI simply moves around idly.
- AI gets distracted by a lamp if it’s bright enough
- A harmless AI follows the player if they see him
- A hostile AI follows and attacks the player if they see him. Hostile AIs move much faster.
The last two are the ones I’m having problems with. The AI is supposed to shuffle between a harmless and hostile AI at random with a variable, and a harmless and hostile AI have their own decorator. But for some reason, the behavior tree only calls to the hostile AI decorator, even if my AI is harmless. It works fine with idle and the lamp, but it’s having trouble choosing between the last two. I need to make it so that the harmless AIs don’t move as fast as the hostiles.
[1]: