Doom RPG-like game and questions about it

I don’t understand how to address the enemies
So I have a Enemy in editor

In the code they are registered as in the generated “3D FPS game” example
изображение

How do I use them in an example like this?


HitEnemy is not working in this example

Yep, I’m trying to do as I did the shooting, as you can see it works for some reason. And here I will have about 8-9 enemies, they will be spread out on the map and not move. And here if there will be a beam coming from the player - they will attack and the variable in gameenemy will switch, well as their health is reduced to zero, I think you saw how I did it.