GameMakerHelpBlog

Monday, January 7, 2008

drawing triangles with 2D

hi

Notice how one of the shapes not included is a triangle. So this scipt can form a 2D trinangle, it uses one argument, The size of it. Also the triangle is what you would call of perfect angle, so it has a right angle and then two 45O angles. To edit the perfect angle you need alot of knowledge of Co-ordinates (i cant remember what you call the mathematical term) and angles

[code]
//put in draw event!
draw_line(x,y,x,y+argument0)
draw_line(x,y,x+argument0,y+argument0)
draw_line(x,y+argument0,x+argument0,y+argument0)

[/code]

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home