Shifts the given path any number of pixels horizontally and vertically.


path_shift(index, xshift, yshift);

参数 描述
index The index of the path to change.
xshift The number of horizontal pixels to shift the path. Negative=left, positive=right.
yshift The number of vertical pixels to shift the path. Negative=up, positive=down.

返回: N/A(无返回值)


With this function you can shift a path along the horizontal and vertical axis. Please note that this will have no visible effect in-game if the instance following the path being shifted follows it relatively (rather than absolutely) as the path's position is disregarded then. This function changes the actual path resource, and so will permanently affect how the path is used by all instances in the game from the moment the function is used until the end of the game.


path_shift(mypath, 50, 50);

This would shift path0 50 pixels right, and 50 pixels upwards.

上一页: Changing Paths
© Copyright YoYo Games Ltd. 2018 All Rights Reserved