ds_grid_multiply_region(index, x1, y1, x2, y2, val);
Argument | Description |
---|---|
index | The index of the grid. |
x1 | The x position of the left of the region in the grid. |
y1 | The y position of the top of the region in the grid. |
x2 | The x position of the right of the region in the grid. |
y2 | The y position of the bottom of the region in the grid. |
val | The value to multiply with the region cells. |
Returns: N/A
With this function you can specify a region of the grid in which
to multiply each cell value by a given amount.
NOTE: This function will only work with real numbers, not
strings.
ds_grid_multiply_region( mygrid, 5, 5, 10, 10, 2 );
The above code will take all the values found within the defined rectangular grid area and multiply each one by 2.