mp_grid_draw

语法:

mp_grid_draw(id);


参数 描述
id Index of the mp_grid that is to be drawn


返回: Boolean(布尔值)


描述

This function will draw the specified mp_grid, marking free cells as green and forbidden cells as red. This function is essential as a debug tool but it should be noted that it is very slow and only works when used in the draw event of the instance.


例如:

draw_set_alpha(0.3);
mp_grid_draw(grid);
draw_set_alpha(1);

The above code will draw the mp_grid indexed in the variable "grid" as a semi-transparent overlay (but only if the instance running the code has a depth lower than all the rest).