Click on the troops you want to send.
You can find the script for a ranged troop but I never got it quite right