Every Tick
-> Enemy.active = false
detectionBox is overlapping Player
detectionBox is overlapping Enemy
---System : compare Abs(Player.X-Enemy.X)<200
-> Enemy.active = true
Is Enemy.active
Every 1 seconds
---Player.X > Enemy.X
-> Spawn Bullet
-> Bullet set angle to 0
---Player.X < Enemy.X
-> Spawn Bullet
-> Bullet set angle to 180
Enemy.active is a BOOLEAN instance variable.
I set it to false every tick and then if the player and the enemy is over the same detection box, it is set to true (the event are read from top to bottom every tick before the system draw the result)
After that, in sub event I check for horizontal distance by checking how many pixel they are appart (with the abs() I don't care if the player is on the left or right of the enemy)
And then if the Enemy.active is set to true I make it spawn bullet at the correct angle (in your game it seems that you always fire horizontally so 0? or 180?)
And that's it