Hi peyet
here is some comments to make it better :
1- in the time when mob is in melee range, set the switch factor to 0 and don't use random generator, this will force mob to do the melee attack
2- the way you had done it, even when the mob targets home it will launch attacks on home ! to avoide that right after move(); put this block :
if (_target.name != _home.name)
{
}
and move all the code above state change in this block. this way the mob launches attacks only if the target is not home.
thanks






