path_assign

Duplicates an existing path.

Syntax:

path_assign(index, path);


Argument Description
index The index of the path to be overwritten.
path The index of the path that will overwrite 'index'.


Returns: N/A


Description

With this function you can copy the path data from one path to another. The path being copied to will be cleared first (should it have any path points) and be completely overwritten by the path being copied from. Neither path is deleted in the process and the result is two paths, with two different indexes, but the exact same form and points.


Example:

mypath = path_add();
path_assign(mypath, choose(path_1, path_2, path_3));

The above code will create a new, empty path indexed in the variable "mypath" and then copy over the path data from one of the three available path resources.


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