ds_grid_multiply_disk

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

Syntax:

GML Code Example

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:

GML Code 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.





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