Category: Landscape / Material
Since engine version: 1.0 OC
Extracts a certain amount of material at the specified position. The return value is the amount actually extracted.
int ExtractMaterialAmount(int x, int y, int material_index, int amount, bool distant_x);
- X position at which material is extracted. Offset in local calls.
- Y position at which material is extracted. Offset in local calls.
- Index of the material to be extracted. Also see Material.
- Maximum amount to be extracted.
- [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.
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.