No Revisions Have Been Made To This Page
Can you suggest an edit for this page? Click Here
This section goes over the structure of the manual as well as an introduction to the GML Language and it's syntax.
This section introduces the types of numbers and basic variables in GML and their related functions.
The section covers the various assets involved in GameMaker: Studio and their related functions as well as Handling Input.
This section contains information about 2D Drawing, 3D Drawing, Shaders, Surfaces, and Views.
This section goes further into detail about the GML Language and more advanced functions like Networking, Data Structures, Physics, and more.
This section is a reference to the Platform Specific functions and methods available to you as well as integrating your game with Third Party Applications.
This section contains Debugging, Miscellaneous, and Obsolete function reference.
View :
Original

Community
Revision

Source
GML Code Example
draw_triangle(x1, y1, x2, y2, x3, y3, outline);
Argument  Description 

x1  The x coordinate of the triangle's first corner. 
y1  The y coordinate of the triangle's first corner. 
x2  The x coordinate of the triangle's second corner. 
y2  The y coordinate of the triangle's second corner. 
x3  The x coordinate of the triangle's third corner. 
y3  The y coordinate of the triangle's third corner. 
outline  Whether the triangle is drawn filled (false) or as a one pixel wide outline (true). 
Returns: N/A
With this function you can draw either an outline of a triangle
or a filled triangle.
GML Code Example
draw_set_colour(c_aqua);
draw_triangle(50, 50, 200, 50, 50, 200, 0);
This will draw a filled aquamarinecoloured isosceles rightangled triangle, with its first corner at (50,50), its second at (200,50) and its third at (50,200).
Can you suggest an edit for this page? Click Here
Does this page need better examples? Be the first to Submit
Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.
Do you have a question about this page? Ask it Here
To use this feature sign in with your Reddit account.