Adds to all the cells in a circular region in a grid to an indicated value (can both be a number or a string).


GML Code Example

ds_grid_add_disk(index, xm, ym, r, val);

Argument Description
index The index of the grid.
xm The x position of the disk on the grid.
ym The y position of the disk on the grid.
r The radius of the disk on the grid.
val The value to add to the cells within the disk.

Returns: N/A


This function can be used to add a given value (real or string) to all the values of the cells found within the defined disk area of a grid. The value to be added must be of the same type as that held within the grid cells, ie: you cannot add a string to a real or vice-versa, and for strings this corresponds to concatenation.


GML Code Example

ds_grid_add_disk(grid, 7, 6, 5, 2);

This would add 2 to all the values held in the cells within the defined disk area of the ds_grid referenced by the variable "grid".

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here