path_position

The calling instance's position on its path

Syntax:

path_position;


Returns: Real


Description

This function can be used to get or to set the position of an instance along a path. The value is normalised from 0 - 1, so if you set it to, for example, 0.5, the instance will be moved to exactly the middle of the path.


Example:

path_position = random(1);

The above code sets the instance to a random position anywhere on the current path.


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