Unreal First-Person Shooter Player Death


I have been developing a FPS over the past year in Unreal 4 C++. While I do have Unity experience, this project has been my first in Unreal.

I have the game’s core functionalities implemented and am currently working on adding the final touches for the first playable version. I have a Death Screen created that pops up when the player dies.

That is all well and good but the transition to the death screen is too sudden. Therefore, I need a death effect to play before the deaht screen pops up.

I am curious about what may be the best way to do that. My hunch is that I will need the camera to fall to the ground.

I have attached the code for the current implementation.

So basically, I have two questions -

  1. How do I set up the camera to fall on player death? I have no experience with animation, so I will need to do this through code entirely.

  2. What do I need to do to prevent the death screen from popping up immediately on player death? In Unity and C#, I would have used a coroutine. Not sure on how to do it in UE C++.

Hey @DukeSternutation, welcome to Unreal!
There’s a forum post from a while back that can help answer your questions about Coroutines.

There are also animation blueprints that you might want to check out, but there’s a pretty easy way to do it:

I hope this can help!