Nice work zxiang1983!
I think the problem is you tied the charge_attack.cas to
the anim command charge. Try switching the anim charge
line to use the charge.cas from the same directory. See if
that keeps them from trying to attack until they close on the
enemy. I don't have the right unit with me to try it out in
Milkshape first but I think this might be the problem. Please
post back your results. It would be great to find new animations
to throw in the game.