ds_grid_multiply_disk

This function will take all the values in a given disc-shaped region of the DS grid, and multiply each one by the given amount.

NOTE This function will only work with real numbers, not strings.

 

Syntax:

ds_grid_multiply_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.
valRealThe value to multiply the cells within the disk with.

 

Returns:

N/A

 

Example:

ds_grid_multiply_disk(mygrid, 5, 5, 5, 2)

The above code will take all the values found within the circular grid area and multiply each one by 2.