These things might be complexed, but it's do-able!
First of all... You have to find out what unit you're targeting. I've searched the comref, but I couldn't find any function thet do this. Maybe you can work out a walkaround??
This object must be publicvariabled so that the server can command the unit to target the object.
Something like this:
INIT.SQS
currTarget = objnull
SENDTARGET.SQS (to use with addAction....)
_caller = _this select 1
currTarget = getTarget _caller
publicVariable "currTarget"
GETTARGET.SQS (executed on the server)
#start
@(currTarget == currTarget)
{_x doTarget currTarget} forEach (units AIGROUP)
currTarget = objNull
goto "start"
OBSERVE that "getTarget" doesn't work!!! You'll have to do a walkaround to find out what object is targetted.
AIGROUP is the group of tanks...
PS. However... You could with ease order your tanks to go to your position if you can't find a way to get the targetted object!