Category: Landscape
/ Material
Since engine version: 5.1 OC
ExtractMaterialAmount
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);
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.
Example
var i=ExtractMaterialAmount(0,0,Material("Water"),10); while (i--) InsertMaterial(Material("Water"),0,-10,Random(5)-2,-10);
Sucks up to ten pixels of water and squirts them up.


