path_shift


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.


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


Example:

path_shift(mypath, 50, 50);

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