Need help - Stop cpu actor attacking

Hallo Community!
I don´t know how to stop the cpu actor of attack , when a enemy doesn´t collide the field of attack area !
But when a enemy collides, the cpu actor needs to starts attack again!
And so on,..
Someone knows how to solve it?
I don´t know how to stop the cpu actor of attack , when a enemy doesn´t collide the field of attack area !
But when a enemy collides, the cpu actor needs to starts attack again!
And so on,..
Someone knows how to solve it?