Paths

GameMaker has an extensive collection of functions and built-in variables for using paths within your game. This section deals with the basic ones that are used when dealing with paths that have previously been created in the Path Editor, but further functions exist that permit you to create your own paths using code, and to manipulate them in various ways.

The following basic functions exist that deal with paths:

 

To aid with debugging paths, you have a function to draw it to the screen too:

 

Each instance of an object also has a series of built-in variables designed to make using paths easier, and these variables are listed in the following section:

 

Finally, it is possible to manipulate the contents of a path as well as create new paths when the game is running. The functions that enable these things and more are available from the following section: