ds_grid_add_disk

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.

 

Syntax:

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

ArgumentTypeDescription
indexDS GridThe index of the grid.
xmRealThe x position of the disk on the grid.
ymRealThe y position of the disk on the grid.
rRealThe radius of the disk on the grid.
valAnyThe value to add to the cells within the disk.

 

Returns:

N/A

 

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".