path_rescale

Scales the given path with respect to its center.

Syntax:

path_rescale(index, xscale, yscale);


Argument Description
index The index of the path to scale.
xscale What to multiply the current horizontal scale by. Default scale is 1.
yscale What to multiply the current vertical scale by. Default scale is 1.


Returns: N/A


Description

This function can be used to rescale the given path along both (or either) the vertical and horizontal axis, basically moving each of the path points to a new position corresponding to this scale around the centre of the path. 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_rescale(path0, 3, 3);

This would rescale path0 to three times its original size.


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