I have a BT where i have a service (AgroCheck) that checks if the player is close, and changes some variables in the blackboard that store the player position and the state of the AI. Depending on the position of the player, this can execute one of three branches:
- Follow player: this executes if the AgroCheck detects the player is close and on sight. It moves the AI to the player position
- Check last known player position: this executes if the player stops beeing on range or sight. It moves the AI to the last known player position
- Wander around: this executes if the player is nowere to be seen. The AI will chose a random point an perform a “moveToLocationOrActor” to that point.
This is the BT:
My problem is that when the Wander task is executing, the AgroCheck service doesn’t. This means that even if the player appears on sight of the AI, if the AI is “Wandering” it won’t notice it, because it’s not doing the AgroCheck.
Maybe i’m not understanding services, because i was expecting the service to be executing continuously, paralel to it’s children.
So my question is, ¿how do i make my AI execute the AgroCheck continuously?
Note: i’m aware of the “simple parallel” node, but if i used that, ¿what would be the point of services?