First thing to do in the startup is to set up the size of your array.
Action Array:Set size. Three fields again Width (X), Height (Y) and Depth (Z).
The array has a width of 1 and a height of 2. So setting the element at, for example, (3,3) has no effect. It's outside the array! Click the array in the project or object bar to show its properties and make it as big as you need.
Your array is not of the right size. At the moment it is barely made of 2 elements.
Also there are redundances and unuseful events in your code (but that's not the main problem).
The stuff is you are relying on grass_q.Y to aim mapGrid's Y. This can't work, as grass_q.y may be as high as 900+ and mapgrid only has 2 Y.
Anyway check the corrected capx. It outputs both Y = 0 and Y = 1.