# AI won't move when spawned by game

**URL:** <https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872>\
**Category:** AI\
**Tags:** ai-navigation, unreal-engine, UE4, Blueprint, question\
**Created:** [July 2, 2017, 2:37pm UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872 "2017-07-02T14:37:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3ca36ca0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3ca36ca0](https://forums.unrealengine.com/u/anonymous_user_3ca36ca0)\
**Post date:** [July 2, 2017, 2:37pm UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872/1 "2017-07-02T14:37:27Z")

</div>

Hi,

I’ve been using these videos to adapt a 3rd person character template into an AI that attacks the player, and wanders when it can’t see the player.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/c/d1c5a9476d7e415f52b3c8abf8e8c01a03aebb49.jpeg "How To Create AI And Enemy Basics - #42 Unreal Engine 4 Beginner Tutorial Series") ](https://www.youtube.com/watch?v=3GV6-4uhkYc)

This all works fine when I place the AI into the map before running the game, But if I try to use blueprints to spawn them in while the game is running they don't do anything.

The AI are spawned in using the Waves blueprint (which is a game state class)

When looking at the debugging screen I can tell that the event tick runs as expected the first time, but once the AI is given a location to move to, it get’s stuck at the check for if the AI is currently moving.

From what I can see, the AI isn’t sensing the player at all

Can anyone see what I’ve done wrong?

I’m relatively new to game dev and UE so if I’ve missed any information, I’ll be happy to provide.

Thanks

Waves Class:

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/b/68bddf638fac316b09918d0fff44bd77a7d4aca3.png)  
Third Person Event Tick:  
 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/b/9dbc1b44843968b6989d7b6f7a4c1fd84398f907.png)  
On See Pawn Event:  
 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/b/81b0d461c74743c255f18dad95215a78432954b6.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3ca36ca0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3ca36ca0](https://forums.unrealengine.com/u/anonymous_user_3ca36ca0)\
**Post date:** [July 3, 2017, 1:06am UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872/2 "2017-07-03T01:06:13Z")

</div>

Does anyone know what might be causing this problem?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3ca36ca0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3ca36ca0](https://forums.unrealengine.com/u/anonymous_user_3ca36ca0)\
**Post date:** [July 3, 2017, 11:35am UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872/3 "2017-07-03T11:35:18Z")

</div>

I found the answer on a different question.

For anyone who might be experiencing the same issue. You need to set the AI to posess the actor when it is spawned in

You can do this under “Pawn” in the Class Settings in the blueprint

![201762-solution.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/c/5ccb94b6a1e8afce21e5d781e4949327c7da176f.png)

---

<div class="post-metadata">

**Author:** ![FatBalloon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FatBalloon](https://forums.unrealengine.com/u/FatBalloon)\
**Post date:** [January 21, 2018, 5:07am UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872/4 "2018-01-21T05:07:00Z")

</div>

You are awesome to me right now. Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0511ec6d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0511ec6d](https://forums.unrealengine.com/u/anonymous_user_0511ec6d)\
**Post date:** [June 12, 2019, 1:28pm UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872/5 "2019-06-12T13:28:44Z")

</div>

Thank you very much !

---

<div class="post-metadata">

**Author:** ![FoamRoc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FoamRoc](https://forums.unrealengine.com/u/FoamRoc)\
**Post date:** [September 5, 2019, 7:31pm UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872/6 "2019-09-05T19:31:38Z")

</div>

dooood, thankyou. been driving me mad

---

<div class="post-metadata">

**Author:** ![sanford87](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sanford87/32/906597_2.png) [@sanford87](https://forums.unrealengine.com/u/sanford87)\
**Post date:** [February 25, 2023, 3:24pm UTC](https://forums.unrealengine.com/t/ai-wont-move-when-spawned-by-game/396872/8 "2023-02-25T15:24:51Z")

</div>

Thank you! This was a Huge help.
