Attacking handled a little better, new wait function to prevent units from moving out of bounds