In that case this would work too:
I prefer tags as Thompson mentioned because it makes your code a little more dynamic. That way if you want to use multiple classes, you just assign them a tag and the logic works the same.
This case assumes that the actor is destroyed when they are dead. So if you’re playing a death animation and leaving them in the level for realism, you’ll want to create a custom event and assign it the same way. You’ll need a reference to your AI so using GetAllActorsOfClass would work better in this case so you don’t have to cast.