Category: Landscape
/ Material Since engine version: 5.1 OC
Description
Extracts a certain amount of material at the specified position. The return value is the amount actually extracted.
Syntax
int ExtractMaterialAmount(int x, int y, int material_index, int amount, bool distant_x);
Parameters
x:
X position at which material is extracted. Offset in local calls.
y:
Y position at which material is extracted. Offset in local calls.
material_index:
Index of the material to be extracted. Also see Material.
amount:
Maximum amount to be extracted.
distant_x:
[opt]
If true, material will be extracted at the most distant horizontal position of the top row of the material body, to a maximum of the material's MaxSlide parameter. If used on liquids, this mode ensures that level pools of 1px height can be extracted by extracting from anywhere horizontally.