path_shift

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

Syntax:

path_shift(index, xshift, yshift);


Argument Description
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.


Returns: N/A


Description

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.


Example:

path_shift(mypath, 50, 50);

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


Back: Changing Paths
© Copyright YoYo Games Ltd. 2018 All Rights Reserved