This page mainly concerns the GetUnits and GetUnitsInRange 4rpl methods.
Here's some data on how different search parameters interact with what is and isn't found. Note that friend and enemy units appear to be searched for slightly differently. The emitter and cannon columns indicate how many units were found when searching at the coordinates of where these units were located.
Code this test was performed with using the 4rpl console; controls other than range, isSquare and is3D were unchanged throughout the test:
Trace(81 1 39 V3 3 true true false 0 0 0 GetUnitsInRange GetListCount) Trace(84 1 39 V3 3 true true false 0 0 0 GetUnitsInRange GetListCount)
Proof the coordinates are correct by tracing all units' position returned by GetUnitPosition