path_insert_point

With this function you can insert a new point into a path (the path can have been created in the path editor or through code using path_add()). The point will be added into the path before the point "n" that is specified in the function.

 

Syntax:

path_insert_point(index, n, x, y, speed);

ArgumentTypeDescription
indexPath AssetThe index of the path to insert the point into.
nRealThe defining point to insert the new point BEFORE.
xRealThe x coordinate (relative to the path) of the new point.
yRealThe y coordinate (relative to the path) of the new point.
speedRealThe speed factor of the point.

 

Returns:

N/A

 

Example:

path_insert_point(mypath, 0, 50, 50, 100);

This will insert a point at the very beginning of the path indexed in the variable "mypath", at (50,50), with a speed factor of 100%.