Unreal Engine 5.1 - AI Taking Damage - FPS Part 32
Unreal By Yourself
00:00 -Intro 00:25 -Weapon Settings 01:00 -Capsule Component (Collision) 02:30 -AI Receive Damage 06:45 -Line Trace (Apply Damage)
Here's a simple implementation in Blueprint:
Create a custom event in your AI character Blueprint class that will be called when the AI takes damage. This event can be named "TakeDamage."
In your AI character Blueprint class, create a "Health" variable that will keep track of the AI character's current health.
In the "TakeDamage" event, you'll subtract the damage from the AI character's health and check if it has reached 0. If the AI character's health has reached 0, you can trigger a "Death" event to handle the death logic.
In the "Death" event, you can play a death animation and deactivate the AI character.
If you learn something new, please like and subscribe.
Below, it the following tools that I use to create the video at no cost
Recording Program/ Enregistrement Gratuit https://obsproject.com/
Video Editor Program/ Éditeur de vidéo gratuit https://www.shotcut.org/
This is Unreal Engine, the best, in my opinion to create video, editing program, the game engine to create games, to creatively increase your knowledge, that keep you entertain at all time, with a lot of resources to help you out at anything and at anytime, creating games such as shooter, platformer, puzzle, racing and more, to create any video, cinematic and others. Don't heisted to try it out and the reward of perseverance to learn will be rewarding in the most satisfying way you can or cannot imagine. Keep the good word and create the best game of all time that will impact the world! ... https://www.youtube.com/watch?v=lgr8HaBvOS8
101019716 Bytes