With this function you can clear an MP grid of all "forbidden" cells.
mp_grid_clear_all(id);
| Argument | Description |
|---|---|
| id | Index of the mp_grid that is to be used |
Boolean
if !instance_exists(obj_Player)
{
mp_grid_clear_all(grid);
}
The above code will clear the mp_grid indexed in the variable "grid", marking all the cells as free, if an instance of the object "obj_Player" no longer exists in the room.