AI ignores changed variable based on player distance to an actor

I set up the player Blueprint to change a Boolean variable “In Light” based on how close the player is to a point light. Here is my setup in the player blueprint-

Even though the Boolean is getting changed based on the distance (the change prints up on screen), the AI bot reacts according to the default setting of the Boolean. Meaning, if the default is set to ‘true’, the AI bot can see the player, if its set to ‘false’, the AI bot cannot.

When I set this boolean with a trigger volume, it worked fine- the player overlap with the volume would change the player’s “In Light” Boolean to ‘false’ and the enemy Bot would ignore the player. Out of the volume and the Bot would react to the player. So I don’t think it is the Behavior tree of the AI bot.

Any suggestions would be a big help.

Hm just a comment to the idea of shadow and visible:

With your current setup, the player could be seperated from the light with a wall in between (so no light touches him) but he would be still in range to the PointLight and marked as visible.

Just something that cam to my mind. Nothing to do with your problem though sorry.

Hey Ashblood-

How is your AI blueprint setup? It sounds like the AI is not reading the variable from the player blueprint properly.

Hi Ashblood,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.