User Tools

Site Tools


prpl:rotateshiptocell

<- PRPL reference <- Ships

RotateShipToCell

ArgumentsResultNotation
Ship UID, Cell X, Cell Y [int int int - ]

Description

Issues a rotate order to a ship to rotate to a given cell. The cell coordinates can be outside the map bounds.

Examples

#request rotation to face towards the center of the map
MapWidth 2 div ->x #half of the width in pixels
MapHeight 2 div ->y #half of the height in pixels
<-x <-y PixelToCell ->y ->x #convert pixels to cells
<-shipId <-x <-y RotateShipToCell
prpl/rotateshiptocell.txt · Last modified: 2017/03/22 11:30 by kajacx