Dividing types into groups

When I was creating my game, I wondered about, if there is any possibility to divide types into group.

As an example when you create the group enemy. You can program, point to nearest enemy and emit or move to.

It would be cool if it would be possible.

This can be done with the new object families update