Hi. Here is my Behaviour Tree for enemies:
In my AIController, in Perception Update I have stated that, when Enemy detects Player, the Blackboard variable of type Actor is set to my player and, when the enemy lost perception of the player, the blackboard variable is set to null.
As you can see in my behaviour tree, when the variable Player is set, the enemy must go for the player (first rotating to him, the pursue him and, when it gets close enough, start attacking him.
I don’t know why, every time the enemy loses perception of the player and the variable is set to null the following error appears:
(The line saying Lost is just a print string of mine for testing when enemy loses perception of the player)
Sometimes, the enemy returns to patrolling as expected and sometimes it becomes fixed in place playing the idle animation but not moving and it resume its movement when the player approaches so the enemy detects him again, but in both cases, the error shows.
Can I get rid of the error?