This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
4rpl:commands:getunits [2021/09/13 19:09] – Grabz | 4rpl:commands:getunits [2021/09/14 11:28] – Grabz | ||
---|---|---|---|
Line 11: | Line 11: | ||
:!: **Note:** The difference between this API and [[GetUnitsInRange]] is this API takes a ' | :!: **Note:** The difference between this API and [[GetUnitsInRange]] is this API takes a ' | ||
GetUnits takes a unit type and from that it will internally find all units of that type. It then enumerates those units and checks if they are in range and if they match the state filters. So GetUnits can be used to find any unit (air, map, or neither). This method can be more performant than GetUnitsInRange if the unit being searched is not found in large quantities on the map. | GetUnits takes a unit type and from that it will internally find all units of that type. It then enumerates those units and checks if they are in range and if they match the state filters. So GetUnits can be used to find any unit (air, map, or neither). This method can be more performant than GetUnitsInRange if the unit being searched is not found in large quantities on the map. | ||
+ | |||
+ | :!: __**Note: 2D square search is currently broken and will find all units as long as they are close enough on X-axis, disregarding the Z-axis. Do not use this combination of parameters.**__ | ||
* **unitType: | * **unitType: | ||
Line 38: | Line 40: | ||
GetUnits(< | GetUnits(< | ||
</ | </ | ||
- | |||
- | === Usage Notes === | ||
- | [[GetUnits]] takes a unit type and from that it will internally find all units of that type. It then enumerates those units and checks if they are in range and if they match the state filters. | ||
- | |||
=== See Also === | === See Also === | ||
- | * [[4rpl: | + | * [[GetUnitsInRange]] |
< | < |