ExtractMaterialAmount

Category: Landscape / Material
Since engine version: 4.6.5.0 CP

Description

Extracts a certain amount of material at the specified position. The return value is the amount actually extracted.

Syntax

int ExtractMaterialAmount (int iX, int iY, int iMat, int iAmount);

Parameters

iX:
X position at which material is extracted. Offset in local calls.
iY:
Y position at which material is extracted. Offset in local calls.
iMat:
Index of the material to be extracted. Also see Material.
iAmount:
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.
See also: ExtractLiquid, InsertMaterial, Material
Sven2, November 2001