Hey Dark,
Try and think about the interactions like the way a light switch works. You can add variables to your 'soldier objects' to check the current state and based off that variable give each soldier commands to follow.
Is the soldier touching wall already? No? Then turn on the switch to make them march.
Is the soldier touching the wall? Yes? Then turn on the switch to make them stop marching and attack.
Is the soldier attacking? Yes? then subtract 1 from the wall's life total once per attack animation.
I know its pretty general, hope it helps.