Legacy GM Changing value of ds_grid's (help me)


Create event;
tiled = ds_grid_create(100, 50);

tiled[# 1, 2] = 2;
this only works in create event, when i put it like mouse button events or networking event it doesn't work and cell's value stays at 0.


That's not much to go on. The problem could be A) your event is not executing properly for some reason, B) event runs but due to incorrectly written code (ie conditionals) the event is not setting the grid, C) event code works but your test is written wrong, D) test works but is looking at wrong target, E) other code is interfering and setting the value back to zero before you test it, or F) something else.

Simon Gust

The mouse button event only runs when the mouse coordinates are overlapping the instance's mask coordinates.
The networking event only runs if a network message is received.