I just started with UE4 and blueprints, so i’m trying to start off creating a simple platforming game. I’m trying to have player take damage and die when they touch floor. I’ve been able to create a health variable, and destroy player when they take damage. However, I cannot figure out how to actually have player take damage from colliding with floor. My best guess is to have floor be damage causer, but that only accepts actors. I’m guessing there might be an easier way to just kill player, but I wanted to actually give player health. Any help is greatly appreciated!
you could create a BP for a damage-giving floor. Take a look at components section of a BP, you can add static meshes or box components etc. You could use those for visible parts of floor as well as collision detection/events etc. When floor detects a collision, cast from it to character to inflict damage.
Hey PWalsh,
Check out this post for some discussion on different ways of handling this, and see if any of it gets you started:
Hope that helps!