# Is it possible to give dynamic acceptable radius to Move to in AI behavior tree?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-give-dynamic-acceptable-radius-to-move-to-in-ai-behavior-tree/599375>\
**Category:** AI\
**Tags:** Behavior-Tree, Behavior-Tree-Node-Reference, unreal-engine, UE4, question\
**Created:** [July 7, 2022, 4:29pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-give-dynamic-acceptable-radius-to-move-to-in-ai-behavior-tree/599375 "2022-07-07T16:29:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arbaros](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@arbaros](https://forums.unrealengine.com/u/arbaros)\
**Post date:** [July 7, 2022, 4:29pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-give-dynamic-acceptable-radius-to-move-to-in-ai-behavior-tree/599375/1 "2022-07-07T16:29:20Z")

</div>

I have created a basic AI that seeks the player, gets in range then attacks. But I want to add variables for making ranged attacks as well. however, I noticed that since the acceptable radius of the AI is 100 when it is in chase mode, the ranged attacks are not executed.

My question, is it possible to make this component of the “Move To” node somehow dynamic so it can randomly change to say 1500 if it fails to catch the player after a specific amount of time has passed?

The player seeking set up

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/e/a/1ea324065cf262121cff2a60e0c01eac31bd537d.png)

Melee attack set up

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/e/c0e95225f107823e557fc81223ec96328713b645.png)

Ranged attack set up

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/1/3516c641b0f4a1e04064a12adf7804c52ffaa56f.png)

AI blueprint

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/6/f/36f4f16a3e88a17b39728ef3f5bc065ba94a9c8c.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/1/b1122d9f065027e2fbcce7a12213617d60b158da.png)

---

<div class="post-metadata">

**Author:** ![samuelthomson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samuelthomson](https://forums.unrealengine.com/u/samuelthomson)\
**Post date:** [October 13, 2022, 1:02pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-give-dynamic-acceptable-radius-to-move-to-in-ai-behavior-tree/599375/2 "2022-10-13T13:02:55Z")

</div>

Hello, did you ever make any progress with this?

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [October 14, 2022, 4:34am UTC](https://forums.unrealengine.com/t/is-it-possible-to-give-dynamic-acceptable-radius-to-move-to-in-ai-behavior-tree/599375/3 "2022-10-14T04:34:51Z")

</div>

I have acceptable radius at 0 and with a generic service I look at the distance to the enemy, from there you can put children with a blackboard that looks at the distance.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/2/bd2d3627f6107eb9a88841e73c6a84bae72ff28b.png)

---

<div class="post-metadata">

**Author:** ![samuelthomson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samuelthomson](https://forums.unrealengine.com/u/samuelthomson)\
**Post date:** [October 15, 2022, 12:34am UTC](https://forums.unrealengine.com/t/is-it-possible-to-give-dynamic-acceptable-radius-to-move-to-in-ai-behavior-tree/599375/4 "2022-10-15T00:34:50Z")

</div>

Thanks, for other people looking, i ended up using a random function:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/b/53b16c611dd5f7ef3c3211713fb5fa9044f6b353.jpeg "How to... Random Decorator") ](https://www.youtube.com/watch?v=uMN1E_cBSog)

---

<div class="post-metadata">

**Author:** ![DuneGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dunegames/32/538495_2.png) [@DuneGames](https://forums.unrealengine.com/u/DuneGames)\
**Post date:** [December 11, 2022, 11:39am UTC](https://forums.unrealengine.com/t/is-it-possible-to-give-dynamic-acceptable-radius-to-move-to-in-ai-behavior-tree/599375/5 "2022-12-11T11:39:59Z")

</div>

You can create your own MoveTo task, as seen here - [BehaviorTree MoveTo - Dynamically set Acceptable Radius - #6 by Nick\_Jackson](https://forums.unrealengine.com/t/behaviortree-moveto-dynamically-set-acceptable-radius/301948/6)
