object - commandobject - unit


void BuildTargetsArray(int nTargetType, int nSideSelection, int nDestinationSelection, int nXFrom, int nYFrom, int nZFrom, int nRange)

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.
nXFrom - X-coordinate of point where to search for targets.
nYFrom - Y-coordinate of point where to search for targets.
nZFrom - Z-coordinate of point where to search for targets.
nRange - range of searching for targets.

Return values
none

Description
[MP]
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.
This function searches for targets in range nRange from point (nXFrom, nYFrom, nZFrom).

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