# AI move to target points with tag

**URL:** <https://forums.unrealengine.com/t/ai-move-to-target-points-with-tag/476356>\
**Category:** AI\
**Tags:** target-point, moveto, unreal-engine, question\
**Created:** [December 24, 2020, 11:15am UTC](https://forums.unrealengine.com/t/ai-move-to-target-points-with-tag/476356 "2020-12-24T11:15:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soleniah](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soleniah](https://forums.unrealengine.com/u/Soleniah)\
**Post date:** [December 24, 2020, 11:15am UTC](https://forums.unrealengine.com/t/ai-move-to-target-points-with-tag/476356/1 "2020-12-24T11:15:45Z")

</div>

Hello there.  
I 've put 3 target points with tag(screenshot 1) in an array and my question is how can I move the AI to the specific target point of my choice? How can I get a reference of the tag of the target point?

AI always goes to the first index of the array(TargerLeft), i guess because of the simple variable TargetPoint .(screenshot2)

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 24, 2020, 3:24pm UTC](https://forums.unrealengine.com/t/ai-move-to-target-points-with-tag/476356/2 "2020-12-24T15:24:03Z")

</div>

Hi there! Where and when do you want to make this decision? Depending of that there can be different implementations.

---

<div class="post-metadata">

**Author:** ![Soleniah](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soleniah](https://forums.unrealengine.com/u/Soleniah)\
**Post date:** [December 24, 2020, 4:53pm UTC](https://forums.unrealengine.com/t/ai-move-to-target-points-with-tag/476356/3 "2020-12-24T16:53:52Z")

</div>

![Lack of information sorry 😛 I want to spawn actors randomly in 3 different locations(screenshot1), where the Y axis changes only. As you can see there are 3 cubes, I want them to go through them and move to Target Points(they are behind the cubes). I guess the easiest why is to check the Y axis of the pawn and if it’ s for example 40 go to array[0] , if it’ s 10 go to array[1] else go to array[2](array of target points). The functionality with the array is good. I basically don 't need Tag for target points. But enemies are spawning only in left side.(screenshot2)  
If there is an easiest way of doing it, I 'm glad to see.

---

<div class="post-metadata">

**Author:** ![Soleniah](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soleniah](https://forums.unrealengine.com/u/Soleniah)\
**Post date:** [December 24, 2020, 6:06pm UTC](https://forums.unrealengine.com/t/ai-move-to-target-points-with-tag/476356/4 "2020-12-24T18:06:27Z")

</div>

I made this but it 's returing -2 for Y axis everytime. I guess the OR integer is not right. I want it to choose between 0,-290,-140.

---

<div class="post-metadata">

**Author:** ![Soleniah](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soleniah](https://forums.unrealengine.com/u/Soleniah)\
**Post date:** [December 24, 2020, 6:36pm UTC](https://forums.unrealengine.com/t/ai-move-to-target-points-with-tag/476356/5 "2020-12-24T18:36:10Z")

</div>

So silly of my it 's bitwise integer so… I guessed there was a functionality where it randomly chooses between 2 or more numbers but i cant find something. It ’ s working now
