Hello!
I am building my first game in Unreal. I did a lot since i started learning Unreal Engine, and while i am going forward in my game developement, i would like to add a death animation for when my enemy reaches the player and kills him. The game is a first person one, and the logic for the death is: When the enemy overlap a box collision inside my playerBP create loading screen widget and then open the Main Menu.
What i would like to add is to start an animation showing the enemy killing my players, and then open the main menu. How can i do that?
For the enemy Ai i am using a behavior tree and the Player is a third person player converted to first person (i like to see the player’s body while playing, including shadows etc.)
Thanks in advance!
hi there. You can just set it to play a death animation when you hit the box collition. You might be able to make your own animtion or get a free one online. Anyway Just have an on overlap event and then cast to you character and play the death animtion. You can then create a widget for your menu and then that pops up on the screen after the animation. There are alot of tutoials and videos online so go and have a look.
Here is an example. There is no animation because I do not have one but here is a basic set up. There are better ways to set this up but since you are new ths is the easiest.
If you want the enemy ai to attack you and kill the character, there are may ways to do this but I would go an have a look at a video for that as I do not know if your ai is using weapons or just run up and attack you.
Good luck and hope that helps!
1 Like
Hello @MillipedeMan and thanks for your answer! I will watch that video and let you know! Thank you so much!!!
1 Like
Hello @MillipedeMan and thanks for your answer!!! It was super easy (and it was unexpected to be so easy) to play the animation!
Thank you again!
1 Like