With this function you can create a path in GameMaker without using the path editor.
This function will return a reference to the path which should be stored in a variable and used in other path functions.
Please note that the created path is empty i.e.: it has no points defined, so you will then have to use the other available functions to add points to the path or use MP grids to generate the path. It will be created as a "closed" path, which you can change.
Once you have finished using the path, or wish to create a new one and store its reference in the same variable, you should first delete the old path with path_delete to prevent memory leaks which can eventually crash your game.
path_add();
global.newpath = path_add();
This will create a new path and assign its index to global.newpath.