AI Move to with condition

Hello! I’m creating a game where if door opens AI have to go to certain place. I created a boolean variable in the door blueprint, if it opens the bool is true. In map blueprint I tried to make a logic if this bool is true, then AI move to that place, BUT AI doesn’t react to bool changing, and just stays. Want to mention, that without this logic AI runs to that place right away.

Hi, your AI MoveTo is inside the EventBeginPlay, so it will only execute once when the level is loaded and never again. If you want the AI to do something as soon as the door is open, then you need to somehow tell the AI at that point (e. g. event dispatcher). Or if you want to constantly check/do something you can use a timer.

1 Like