ds_grid_multiply_disk

Multiply all the values contained within the disc region by a given amount.

Syntax:

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


Returns: N/A


Description

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.


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.


Back: DS Grids
Next: ds_grid_multiply_region
© Copyright YoYo Games Ltd. 2017 All Rights Reserved