Returns the facing direction of unit UID. Behaves differently depending on the unit's rotate mode:
For units in rotate mode 0 (constant, only possible in custom units), direction is always 0.
For units in rotate mode 1 (left/right, which all built-in units use), direction is 0 if facing right or 1 if facing left.
For units in rotate mode 2 (four-way, only possible in custom units), direction is 0 if facing right, 1 if facing up, 2 if facing left or 3 if facing down.
If unit UID does not exist, 0 is returned.
Examples
# need worked example
ixe/irpl/unit/getunitdirection.txt · Last modified: 2025/02/14 14:57 by 127.0.0.1