distance(enemy.x,enemy.y,player.x,player.y) < 200
enemy >rotate angle towards pos player.x,player.y - speed 10
subcondition every 1.2 seconds - create bullet at imagepoint 0 /set angle movement enemy.angle
=====================================
event condition separated for bullet or you can add it in action above on every 1.2 seconds when bullet is created automatically gets the angle.
=====================================
bullet on created set angle movement enemy.angle
=====================================
bullet actor must have bullet behavior on it.
you can add a event for bullet getting destroyed
=====================================
bullet traveled > 500 px
or
bullet on collission with player - action destroy.
=====================================
and a event for player life substraction you will need a localvariable or a number set on the player.
=====================================
player on collision with bullet substract "your value" from life
=====================================
thats the simple code. you will need to adapt that to C2 event system. but its mostly what the event language looks like.