SNPC's Melee Attack. HELP!

Hey I want to make a Zombie SNPC but I cant make it Melee Attack! Give me some hints please.

I want I can define melee attack distance (I won’t my SNPC attacking with melee the enemy which standing 1000 meters from him!)