Group: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Clarified the definition of group. It is NOT an array of units! It is it's own data type.)
Line 1: Line 1:
=Group Type=
A group is its own data type in the scripting language. All units belong to a group. If units are linked together in the editor, they are all part of the same group. If a unit isn't linked to anyone else, then it belongs to its own group.


A Group is an [[Array]] of like minded [[Array|Units]]
The AI makes many decisions as an entire group, instead of on an individual unit level. For example, behavior, combat mode, and waypoints are decided on a group, not an individual level.


while it is a ''distinct'' data type in the scripting language, commands which work on [[Array|Units]] or [[Array]]s ''generally'' work on groups as well
To get the group that a unit belongs to, use the [[group]] command.


_soldier AllowFleeing 0.5
To get the unit that currently leads a group, use the [[leader]] command.
_group allowFleeing 0.7


To get an array of units that are in a group, use the [[units]] command.


[[Category: Data Types]]
[[Category: Data Types]]

Revision as of 02:47, 18 February 2009

A group is its own data type in the scripting language. All units belong to a group. If units are linked together in the editor, they are all part of the same group. If a unit isn't linked to anyone else, then it belongs to its own group.

The AI makes many decisions as an entire group, instead of on an individual unit level. For example, behavior, combat mode, and waypoints are decided on a group, not an individual level.

To get the group that a unit belongs to, use the group command.

To get the unit that currently leads a group, use the leader command.

To get an array of units that are in a group, use the units command.