# How do I make my enemy character walk from one point to another and despawn?

**URL:** <https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159>\
**Category:** Character & Animation\
**Tags:** unreal-engine, enemy, question\
**Created:** [August 29, 2021, 8:08pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159 "2021-08-29T20:08:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zapking9224](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zapking9224/32/1060813_2.png) [@Zapking9224](https://forums.unrealengine.com/u/Zapking9224)\
**Post date:** [August 29, 2021, 8:08pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/1 "2021-08-29T20:08:06Z")

</div>

Hi,  
So I have a game where there’s an enemy who will stalk you while you solve puzzles. But a way to introduce him to build tension is to have him walk down a hallway perpendicular to the hallway the player is in and then despawn once he’s out of view. I tried using a sequencer to have its position move across and I tried adding an animation, but he would just sit in an idle state as it slides across the hallway. Is there a better way to do this or am I using the sequencer wrong?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 30, 2021, 9:05am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/2 "2021-08-30T09:05:59Z")

</div>

Inside the character:

 ![347638-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/c/e9c3e361f4914f86d938083cf663ccac5ad06faa.jpeg)

![347639-3p.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/8/7089ff337380effe1fa3d0a43ae7895956c000ef.gif)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 30, 2021, 9:13am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/3 "2021-08-30T09:13:39Z")

</div>

Or

 ![347640-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/b/66b4b108fc635f3cb81e778117b45d3355131a4a.jpeg)

![347661-3p2.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/f/4efc8ec447a942460bd6ee432f03acc1c3fe0396.gif)

---

<div class="post-metadata">

**Author:** ![Zapking9224](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zapking9224/32/1060813_2.png) [@Zapking9224](https://forums.unrealengine.com/u/Zapking9224)\
**Post date:** [September 1, 2021, 3:31am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/4 "2021-09-01T03:31:37Z")

</div>

Hey, thanks for your response! I did that and used an actor location for the enemy to walk to. But he won’t walk anywhere.

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [September 1, 2021, 6:56am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/5 "2021-09-01T06:56:13Z")

</div>

Are you using a Nav Mesh Bounds Volume?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [September 1, 2021, 7:19am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/6 "2021-09-01T07:19:54Z")

</div>

Like EC say, you need a nav mesh bounds…

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/7/0672d819f607a7cde3b14682a5e33938d1b7e405.jpeg "WTF Is? Volume - Nav Mesh Bounds in Unreal Engine 4") ](https://www.youtube.com/watch?v=hE7aMBeT53o)

---

<div class="post-metadata">

**Author:** ![Zapking9224](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zapking9224/32/1060813_2.png) [@Zapking9224](https://forums.unrealengine.com/u/Zapking9224)\
**Post date:** [September 1, 2021, 12:58pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/7 "2021-09-01T12:58:11Z")

</div>

I have a navmesh already there. I have a working ai that stalks the player and it works fine. I’m using a copy of that same character but without the controller that I use so it doesn’t walk wherever it wants and instead only walks where I want it to. Basically from point A and then to a specific location at point B.

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [September 1, 2021, 1:18pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/8 "2021-09-01T13:18:18Z")

</div>

Can you shows us what you doing?

Also, you said you removed the ai controller. What exactly do you mean by that? The character still has the default AIController set, right?

---

<div class="post-metadata">

**Author:** ![Jaco001](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jaco001](https://forums.unrealengine.com/u/Jaco001)\
**Post date:** [September 1, 2021, 3:33pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/9 "2021-09-01T15:33:19Z")

</div>

AI is ok, but sometimes it is simpler to use spline or just move location of actor with enabled animation.

---

<div class="post-metadata">

**Author:** ![Zapking9224](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zapking9224/32/1060813_2.png) [@Zapking9224](https://forums.unrealengine.com/u/Zapking9224)\
**Post date:** [September 1, 2021, 7:34pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/10 "2021-09-01T19:34:21Z")

</div>

![347766-wireframe1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/f/f9f3c88d47660018279d56cd3a6499e746def654.jpeg)

This is a layout of the area where I have an enemy that uses a behavior tree to walk around and it works well.

 ![347767-wireframe2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/7/607d9f4c570fc170c2a2f9e9c089d5b01f1c791b.jpeg)

The red arrow in the second picture shows what I want where the enemy walks past the player (green arrow) and despawns at the red x just to give the player the creeps for a while until the chase sequence starts (which I already have working).

![347768-enemycontroller.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/6/2f688f8dc1508e76560c25ee73b6f5dc5541e793.jpeg)

The third picture shows how I’m using my own enemy controller.

![347769-manualenemynocontroller.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/c/e4c07799db0acc838d4759461a2754538a841869.jpeg)

What I did was I removed the enemyController so it wouldn’t search for the player and instead just walk from one point to another and then destroy itself. I don’t know how to get it to move and walk even when using the nodes to say to walk to a location.

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [September 1, 2021, 7:56pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/11 "2021-09-01T19:56:04Z")

</div>

Since the movement logic is in the character, make sure to set the AI controller class to “AIController” and if you are using AI MoveTo, connect the Pawn pin to self.

 ![347824-ai2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/1/d01cc9e241a87977f599a388bc6dad9c1ed27b75.jpeg)

---

<div class="post-metadata">

**Author:** ![Zapking9224](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zapking9224/32/1060813_2.png) [@Zapking9224](https://forums.unrealengine.com/u/Zapking9224)\
**Post date:** [September 1, 2021, 8:12pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-enemy-character-walk-from-one-point-to-another-and-despawn/488159/12 "2021-09-01T20:12:45Z")

</div>

So I think it was just a bug because after closing out of UE4 from last night and I just tried it again, it worked perfectly fine. But you were right about the AI controller and everything else. I appreciate your help!
