path_get_x

With this function you can get the x coordinate of a position on any given path. 0 is the start of the path, 1 is the end of the path, and anything in between equates to that far through the path. This needn't be a defining point of the path, it can be anywhere on it.

 

Syntax:

path_get_x(ind, pos);

ArgumentTypeDescription
indexPath AssetThe index of the path to check.
posRealHow far through the path to check. Between 0 (start) and 1 (end).

 

Returns:

Real

 

Example:

x = path_get_x(pth_WallWalk, 0.5);

This will set the calling instance's x to the x coordinate of the point at exactly halfway through the given path.