|add_member(unit)||Make a unit a member of this group.|
|set_command(command)||Give this group a command.|
|set_autonomous()||Make this group autonomous.|
|start_moving()||Make the group start moving even if some of its members haven't yet arrived.|
|destroy()||Dissolve this group.|
|members :: array of LuaEntity [R]||Members of this group.|
|position :: Position [R]||Group position.|
|state :: defines.group_state [R]||Whether this group is gathering, moving or attacking.|
|force :: LuaForce [R]||The force of this unit group.|
|surface :: LuaSurface [R]||The surface of this unit group.|
|valid :: boolean [R]||Is this object valid?|
A collection of units moving and attacking together. The engine creates autonomous unit groups to attack polluted areas. The script can create and control such groups as well. Groups can accept commands in the same manner as regular units.
Make a unit a member of this group. Has the same effect as giving a
group_command with this
group to the unit.
Make this group autonomous. Autonomous groups will automatically attack polluted areas.
Make the group start moving even if some of its members haven't yet arrived.
Dissolve this group. Its members won't be destroyed, they will be merely unlinked from this group.
Members of this group.
Group position. This can have different meanings depending on the group state. When the group is gathering, the position is the place of gathering. When the group is moving, the position is the expected position of its members along the path. When the group is attacking, it is the average position of its members.
Whether this group is gathering, moving or attacking.
The force of this unit group.
The surface of this unit group.