Pick every units in units within "X" range of target point of ability being cast matching (here you put the conditions, I think you need to put conditions like check if the unit is not a structure, if the matching unit is an enemy of the casting unit...) and then add picked unit to targets_group.