Setting a path
In GameMaker, paths can be used for many things, some of which will be discussed in the following recipes. Before we get started with the recipes, it might be helpful to first learn how to create simple paths and move objects along them.
Getting ready
Before we make a path, let's take a quick look at the tool itself. To open the path editor, click on the icon at the top of the window that looks like a green arrow moving in a serpentine fashion.
This will open a window where you can plot the path, straight or curved, to be used in your game.
Name the path, path_test
.
How to do it
- With the path editor open, select Smooth Curve.
- Uncheck the box marked Closed.
- Click on the grid to place the first point of your path.
- Place two more path points along the same x axis.
- Now that the second point has turned blue, you can alter the curve of the path. Move this point up in order to create an upwards curve.
- Continue with the path by adding more points and adjusting the curves of each section...