<- CRPL reference <- Unit Commands

GetUnitTransformPosition

ArgumentsResultNotation
Pixel X and Y coords of unit, z coord – X1 Y1 Z1

Description

Normally, this method returns the same as CurrentPixelCoords plus a zero. However, if the unit is ascending to orbit, the z value begins going negative and the y value climbs. It is worth noting that during such an event, CurrentPixelCoords does not change, but CurrentCoords does. In fact, if you run CellToPixel on CurrentCoords, you will get the x and y values that this method returns, rounded to the nearest multiple of eight.

Examples

#let us watch this weirdness:
ShowTraceLog
ClearTraceLog

CurrentCoords CellToPixel
CurrentPixelCoords
GetUnitTransformPosition TraceStack

Once
AscendToOrbit
Endonce