~~NOTOC~~ <=[[4rpl:start| Index]] * [[4rpl:commands:getunitorientation|Get]] * [[4rpl:commands:setunitorientation|Set]] :!: Available in version 2.3.2 and later. ====== GetUnitOrientation ====== GetUnitOrientation(<-unit) ->orientation ===== Description ===== Get the orientation of a unit. The orientation is one of 4 values, 0,1,2,3. These correspond to FORWARD, RIGHT, BACK, LEFT. The default orientation for units is 0, or FORWARD. Changing the orientation will rotate the unit, in increments of 90 degrees, to face in the given orientation. If the unit occupies the map, the cells occupied by the unit will be updated. ===== Examples ===== GetUnitOrientation({-UID) ->orientation === See also === * [[SetUnitOrientation]] * [[GetUnitRotation]] gets the arbitrary rotation of the unit. <=[[4rpl:start| Index]]