Currently I have a simple AI which look like this:
- Selector [root]
— Chase player and attack [Sequence]
——- Find player [Action - custom - failure when cannot detect player]
——- <to be implemented>
— Wander [Sequence]
——- Random wander point [Action - custom]
——- Move to wander point [Action - custom]
——- Wait a bit [Action - timer]
The idea is, when the AI not detecting the player, it will on “Wander” state and keep moving around. However, when the player is detected, it should goes into the “Chase” state and chase down the player. However, the AI will not detect player when it is in the middle of running the Wander sequence (either when it is moving or waiting). Is there a way to “break” the sequence?
Another way to ask: is there a way to force RAIN AI to start again at the root at every tick instead?
P.s: I am aware of the method of using parallel node as showing in this thread http://rivaltheory.com/forums/topic/example-xml-files. However, I feel it would later complicating the tree with so many nested parallel group
This topic was modified 3 months, 3 weeks ago by ngtrhieu0011.