# AIController Not working on spawn actor

**URL:** <https://forums.unrealengine.com/t/aicontroller-not-working-on-spawn-actor/428301>\
**Category:** AI\
**Tags:** Behavior-Tree, expose-on-spawn, unreal-engine, bug-report, question\
**Created:** [June 28, 2018, 5:23pm UTC](https://forums.unrealengine.com/t/aicontroller-not-working-on-spawn-actor/428301 "2018-06-28T17:23:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brahoule](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brahoule](https://forums.unrealengine.com/u/brahoule)\
**Post date:** [June 28, 2018, 5:23pm UTC](https://forums.unrealengine.com/t/aicontroller-not-working-on-spawn-actor/428301/1 "2018-06-28T17:23:43Z")

</div>

I am following the unreal engine tutorial on MOBA creep and I’m stuck on the part 3 where they change SpawnAI for a Spawn actor from class cause the minions have to set default lane and team but the issue is the AI Controller are not working at all… I do print string on begin play and event tick in AIController and nothing print out on the screen…  
I need to get it work to run the behavior tree. I have try to change the setting in minion blueprint (Auto possess ai) \> to placed in world or spawned… but it doesn’t work. Anyone know what is going on here?

---

<div class="post-metadata">

**Author:** ![brahoule](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brahoule](https://forums.unrealengine.com/u/brahoule)\
**Post date:** [June 28, 2018, 6:25pm UTC](https://forums.unrealengine.com/t/aicontroller-not-working-on-spawn-actor/428301/2 "2018-06-28T18:25:29Z")

</div>

(UPDATE) I had to use SpawnDefaultController on the SpawnActorFromClass. now it work well.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4831697a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4831697a](https://forums.unrealengine.com/u/anonymous_user_4831697a)\
**Post date:** [March 8, 2021, 12:15pm UTC](https://forums.unrealengine.com/t/aicontroller-not-working-on-spawn-actor/428301/3 "2021-03-08T12:15:07Z")

</div>

thankyou, in c++ code, use pawnPtr-\>SpawnDefaultController.
