Attacking the player

This section sounds deceptively simple, but you'll need several missing pieces when you step through the design process:

  • A fleshed out animation blueprint that can switch the enemy's state while moving and attacking
  • The enemy's ability to be damaged and killed
  • A decision on how and where attack success is resolved (weapon bounding, a one-frame cone-test in front of the enemy, that is, how realistic does hitting the player need to be?)

The second step typically involves a bit more of our UI section's work, and the player should similarly be able to be killed and respawned, but these should be do-able after all the other lessons to this point and won't be covered in depth here. For things such as healthbars to display ...

Get Mastering Game Development with Unreal Engine 4 - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.