New Engage, Wander and patrol Behaviours
In addition to the patrol branch of my behaviour tree (BT) I have created another branch that handles the the control of flow once the player has been spotted. At the root node I have added another child selector which will select a behaviour based on if that current guard can see the player, or if the player has been seen by another guard. If the player has been sighted by this guard, the tree will check the state of the player, if they are in combat (can see the player) they will update their speed and enter another selector. The Shoot or Move selector will decide if the player is within a certain range, if the player is within this range, the guard will "shoot" and kill the player, causing them to respawn back at the start location and the global blackboard will reset the guards states back to idle. Although once the player is respawned two guards remain in the alerted state. This is something I will look into and hope to resolve before the project deadline. If the