okay. here's what you do:
Trigger around map room, Condition:
"M3" CountType ThisList > 0
Activation
{format [{MyM3%1 = _x}, "M3" CountType _x] ForEach [_x]} ForEach ThisList; M3InRange = true
deactivation:
M3INRange = False
another trigger, condition:
M3InRange = true && speed MyM31 < 3
activation
{dude = "SoldierWB" CreateUnit getpos MyM31} ForEAch [1,2,3,4,5,6,7,8,9,10]; dude domove getpos maproom ForEach units group dude
(actually I think CreateUnit wants alittle more, but the comref can bail you out)