FANDOM


Path Edit

Paths are pre-defined trails that you define using the Gamemaker path editor. Paths can be assigned to objects to follow and have a number of Actions assigned to them.

Defining and Editing a path Edit

Paths are created by using the context menu on your folder menu on the 'Paths' folder and clicking 'Insert Path' or by clicking the wavy line icon on your top bar. The Path editor will open with your newly created path selected. To define the path, click on points on the grid and Gamemaker will generate the correct line vectors between the points you've selected. Using the buttons on top of the window, you can flip and mirror your path as well as rotate and transform it. If you click on a node on the left listbox window, you can select an individual node and edit it's settings. The 'Closed' checkbox will close the path forming a loop. The add button appends a new node onto the list, and the insert button adds a new node above the currently selected one. Use the delete button or 'Del' to delete a node.

Usage Edit

To use your newly created path, or another one, open the object you want to move on your path and select the 'move' tab. Under 'Paths', there are several Actions we can use.

Set Path Edit

Set Path will set the object's path to the path you select, the speed and whether or not it stops at the end, as well as if it is relative to the object's position.

End Path Edit

End Path will remove the current path from the object. There are no editable options.

Path Position Edit

Path Position will control where the object is and move it to the specified position, where 0 is the start and 1 is the end.

Path Speed Edit

Path Speed sets the speed of the path currently assigned to the object to the value entered.

Code Edit

Paths can be manipulated using the following code:

path_add(); // Adds a new path
path_add_point(index,x,y,speed); // adds a new point at x and y with a speed
path_append(index,path); // appends a new point to path
path_assign(index,path); // unsure of this one
path_change_point(index,n,x,y,speed); // unsure of this one
path_clear_points(index) // unsure of this one

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.