Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class Unreal Engine 5: Game Third Person Shooter Part 4 - AI Enemy”.
Other ways we can help with Unreal Engine.
Learn with a mentor
Scheduled Game Development courses with live guidance and a certificate.

Course/Training Unreal Engine — Procedural Animation for Humans in Unreal Engine 5
★ 5.0 (60)

Course/Training Unreal Engine — Training Unreal Engine Master Class Selama 3 Hari - Kelas 2
★ 5.0 (7)

Course/Training: Unreal Engine 5
★ 5.0 (7)
Have it built for you
No time to learn Unreal Engine? Our team can do the project for you.

Development Service: Unreal Engine — Unreal Engine 4 – Build Your First Game with UE4!!
★ 5.0 (12)

Development Service: Unreal — Unreal Engine 5 Blueprints: Multiplayer Shooter (FPS)
★ 5.0 (10)

Development Service: Blender — Blender Character Design Master for Unity & Unreal Engine
★ 5.0 (9)
Get notified about new Unreal Engine classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
In part 4, we create an AI enemy that chases the player, can be shot, loses health, and falls down with a ragdoll effect. Hello, welcome back to Cerdas Inovasi Digital. In part 4, we create an enemy with artificial intelligence. The enemy chases the player, can be hit by gunfire, loses health, and then falls down when its health runs out. Let's start!
In order for the enemy to know which paths it can take, we need navmeshes. Click the Quick Add button, type Navmes, then select Navmes Bounds Volume. Set the location to 0, 0, 100, and Scale 16, 16, 3,
so that the volume covers the entire arena.
Click Via Port then press the P key. The green area is the path that the AI can walk through. Notice that around obstacles and pillars it is not green, because it cannot be walked through. Now we create the enemy character.
In the content browser, right-click, select Blue Appoint Class, then select Character.
Name it BP underscore Enemy, then double-click to open it.
In the Mesh section, change the Location Z to minus 90 and Rotation Z minus 90, so that the feet are on the ground and the body faces forward. In the Skeletal Mesh Asset,
Select SKM underscore Money underscore Simple. Our enemy uses the Money character, different from the player who uses Queen.
In Anim Class, select ABP underscore Unarmed. Because the animation is the same as the player, the enemy also automatically holds a rifle in the aiming position.
Select Mesh, add a Skeletal Mesh component named weapon, select SKM underscore Rifle, and place it on the Handgrip socket R-Reset Location and Rotation to 0.
Select Character Movement, find Max Walk Speed and change it to 150, so the enemy walks slowly and the player has time to shoot.
Open Event Grab. From Event Tick, drag and add the Simple Move to Actor node. This node makes the AI walk towards the target using Nav Mesh. Connect Controller with Get Controller,
and Goal with Get Player Character. In other words, the enemy is always walking to chase the player.
Create a variable for health of type float. Click Com Pilih, then fill the initial value to 100.
Drag Grab to an empty area Then add the Event Ani Damage. This event is automatically called every time the enemy takes damage.
Add Set Health, its value is health minus damage. So every shot reduces the enemy's health.
Then create a branch with the condition that health is less than or equal to 0. If true, the enemy dies.
From True, add Set Collision Enable for Capsule Component with the option No Collision, so its body no longer blocks.
Then Set Simulator P6 on the Mesh, and check Simulator. This makes the enemy fall with a realistic Ragdoll effect.
Add a Delay of 3 seconds, then Destruck Actor, so the enemy's body disappears after 3 seconds.
Click Com Pilih and Shave, then close Blue Apprint of the enemy.
Now the player's shots should deal damage.
Open BP Underscore Terpersen Charakter on Grab Menembak.
From Pin Out Hit belonging to Line Trudge, pull and select Break Hit Result, then open all pins.
After Print String, Add Damage Actor. Damage Actor is filled with Hit Actor, which is the object that gets hit by the shot, and Base Damage 25. So the enemy dies after 4 shots.
Change Trudge Channel to Camera. Mask Character does not block channel visibility, but blocks the camera channel, so the shot can hit the enemy's body.
Com Select, Shave, then close Blue Apprint player.
It's time to place the enemy. Drag the enemy's BP Underscore from the content browser to the arena, then set its location in front of the player. Enemy two, slightly to the right. Enemy three, further to the right side of the arena. Click Shave All to save everything.
Press Play.
The three enemies immediately start chasing us. Hold right to aim, then click left to shoot. After 4 shots, the enemy falls down with Ragdoll effect.
Done. Our AI enemies can now chase, Hit by the shot, and die. In part 5, we will enhance the shooting with Niagara effects, weapon muzzle flashes and splash effects when the bullet hits the target. Don't forget to subscribe, like, and share. Goodbye. Want to master game development with Unreal Engine? Cerdas Inovasi Digital offers complete Unreal Engine courses, game and 3D character development services, as well as selling ready-to-use project files. Contact us via WhatsApp, or visit cerdasinovasidigital.com done. Goodbye. Thank you. Thank you. Thank you. Thank you. Thank you.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →