If you want the boss to have certain actions under certain conditions, you have to create those conditions and attach the actions..
It's like programming anything else..
First decide what you want the boss to do..
then decide when he should do itband when not..
then create the events/conditions based on that..
let's for example say your boss has an attack he only performs when the player is within 100 to 200 pixels to the left of the boss
system is between values : player.x (is between) boss.x-200 (and) boss.x-100
boss play attack