CanInsertMaterial

Category: Landscape / Material
Since engine version: 4.0 OC

Description

Tests if a material pixel at the given position can be inserted.

Syntax

bool CanInsertMaterial(int material_index, int x, int y, proplist out_insertpos);

Parameters

material_index:
Material to test to be inserted (see Material()).
x:
[opt] X insert position or offset
y:
[opt] Y insert position or offset
out_insertpos:
[opt] If a writeable proplist is passed, members x and y are filled with the position at which the material would be inserted.

Remark

If the target position already contains material of the same density as the inserted material, the engine will search upwards for a proper insertion position.
See also: Material
Sven2, 2001-11