Hi,
I want to create a simple behaviour tree for an npc.
The default state is the idle state where the npc just stands and does nothing, if a certain amount of time passed and the npc didnt see the player then the npc should transition to the patrole state. If the npc sees the player while he is in idle or patrole mode he should switch to the chase state. if he is in the chase state and the distance between the npc and the player is greater than a certain value the npc should switch to idle mode. if the npc finished patroling then he should automatically switch to the idle state.
could someone please provide me with a corresponding behaviour tree implementation? Thanks very much!