object - commandobject - unit


void BuildTargetsArray(int nTargetType, int nSideSelection, int nDestinationSelection)

Scope: private

Parameters
nTargetType - combination of following values:
findTargetWaterUnit - ship,
findTargetFlyingUnit - flying unit,
findTargetNormalUnit - land unit,
findTargetBuildingUnit - building,
findTargetAnyUnit - any of aboves,
findTargetWall - wall ED or UCS,
findTargetBuildingRuin - building ruin.
nSideSelection - one of following values:
findEnemyUnit - enemy unit,
findAllyUnit - ally unit,
findNeutralUnit - neutral unit,
findOurUnit - our unit.
nDestinationSelection - combination of following values:
findDestinationCivilUnit - civil unit,
findDestinationArmedUnit - armored unit,
findDestinationRepairerUnit - Repairer,
findDestinationSupplyUnit - Supplier,
findDestinationAnyUnit - any of aboves.

Return values
none

Description
This function is used for finding objects in units range of view by conditions put in parameters.
All found objects are stored in internal static table. Count of found objects can be obtained by function GetTargetsCount,
and particular units can be obtained by call StartEnumTargetsArray, next GetNextTarget to get following objects and EndEnumTargetsArray at end of using results.

See also
FindTarget, SortFoundTargetsArray, GetTargetsCount, StartEnumTargetsArray, GetNextTarget, EndEnumTargetsArray