• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Crashes when using mp_grid_draw

P

peeps4321

Guest
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