I looked through some of your code. Those early attacks are being triggered by enemies spawning. Perhaps you can run a random chance of attack instead of always attacking on spawn. I like the search time and area code though. I actually made it longer and smaller, so it feels like they kind of "smell" you and where you used to be. But you could possibly use another random variable for those things.
I honestly gave up on the mod though and wasnt able to see all those movement tactics you coded. After getting attacked at the start of the game immediately it got tiring.