# FInd Random Patrol In AI Tutorial Not Working

**URL:** <https://forums.unrealengine.com/t/find-random-patrol-in-ai-tutorial-not-working/480027>\
**Category:** AI\
**Tags:** behaviour-tree, unreal-engine, question\
**Created:** [March 10, 2021, 5:11am UTC](https://forums.unrealengine.com/t/find-random-patrol-in-ai-tutorial-not-working/480027 "2021-03-10T05:11:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppcmdgamesx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ppcmdgamesx](https://forums.unrealengine.com/u/ppcmdgamesx)\
**Post date:** [March 10, 2021, 5:11am UTC](https://forums.unrealengine.com/t/find-random-patrol-in-ai-tutorial-not-working/480027/1 "2021-03-10T05:11:50Z")

</div>

I created almost the same setup as stated in this tutorial from the UE documentation:  
[[Behavior Tree in Unreal Engine - Quick Start Guide | Unreal Engine 5.1 Documentation](https://docs.unrealengine.com/en-US/InteractiveExperiences/ArtificialIntelligence/BehaviorTrees/BehaviorTreeQuickStart/index.html)][1]

However, the AI enemy chases the player but doesn’t keep patrolling the area when it cannot see the player. I verified that I have all the required scripts several times, but still cannot find the problem. A screenshot of the Behaviour tree running, is attached, In the tutorial, the ‘Move To’ function of the Patrol sequence was being executed, but here, only the Wait function is executed. The screenshots of the BTT\_FindRandomPatrol function are also attached. What is the issue and what am I missing? Thanks in advance.

 ![331966-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/1/3716e8a11d2e855f8e4eae57ab788d3d7fa2a415.png)

 ![331967-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/6/d16f35828df61ee7a4271caa032f462a2bbb3e2c.png)

 ![331968-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/6/476675d0ef4a02537f3ec7d6e732b6d03e145b5e.png)

---

<div class="post-metadata">

**Author:** ![Sharky151](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sharky151](https://forums.unrealengine.com/u/Sharky151)\
**Post date:** [March 28, 2021, 3:32am UTC](https://forums.unrealengine.com/t/find-random-patrol-in-ai-tutorial-not-working/480027/2 "2021-03-28T03:32:15Z")

</div>

I just worked through this same tutorial myself and had the same error. Here is the solution that worked for me. 1) Open BTT\_FindRandomPatrol. 2) click PatrolLocation on the left-hand Variables list 3) click “Instance Editable” in the right-hand details tab. 4) compile and save

Next in the BT\_Enemy (Behavior Tree Tab) 1) click the BTT\_FindRandomPatrol (task in purple on the tree) 2) in the left-hand details panel change the PatrolLocation (which should now be visible since we changed to “Instance Editable”) drop-down from EnemyActor to PartrolLocation.

Save and compile everything and it should work now.

---

<div class="post-metadata">

**Author:** ![CosmicMuWanderer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cosmicmuwanderer/32/595583_2.png) [@CosmicMuWanderer](https://forums.unrealengine.com/u/CosmicMuWanderer)\
**Post date:** [November 9, 2022, 8:42am UTC](https://forums.unrealengine.com/t/find-random-patrol-in-ai-tutorial-not-working/480027/3 "2022-11-09T08:42:30Z")

</div>

Encountered this problem and your check / solution worked for me. Thank you! Have a nice day!

---

<div class="post-metadata">

**Author:** ![ZenOh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zenoh/32/629408_2.png) [@ZenOh](https://forums.unrealengine.com/u/ZenOh)\
**Post date:** [February 9, 2023, 12:19am UTC](https://forums.unrealengine.com/t/find-random-patrol-in-ai-tutorial-not-working/480027/4 "2023-02-09T00:19:08Z")

</div>

Many thanks! Worked for me, too.

---

<div class="post-metadata">

**Author:** ![vishwah13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vishwah13](https://forums.unrealengine.com/u/vishwah13)\
**Post date:** [January 31, 2024, 7:01pm UTC](https://forums.unrealengine.com/t/find-random-patrol-in-ai-tutorial-not-working/480027/5 "2024-01-31T19:01:38Z")

</div>

Same problem, your solution worked, Many thanks.
