GMS 2 Crashes when using mp_grid_draw

peeps4321

Member
Hi
I'm trying to set up a grid path-finding system but am running into some problems. I have an object for creating a grid and drawing it (obj_grid_map1). There is no crash when I just create the grid, but when I try to draw it I get this:

1585249936428.png



Creation Code:
GML:
global.grid_map1 = mp_grid_create(0, 0, room_width, room_height, room_width / 50, room_height / 50);
Draw Code:
GML:
draw_set_alpha(.2);
mp_grid_draw(global.grid_map1);
draw_set_alpha(1);
Any help is appreciated, thanks :)


-Samuel
 
Top