Err let me rephrase my question.
Here is what I want to do.
Spawn a unit at Point A.
Make the units attack all the way to Point B.
However, here arises a problem.
The spawned unit, after reaching halfway by meeting some resistance, say a hero, after attacking a while, returns back to the spawn point A.
Is there a way to stop this from happening?