InsertMaterial

Category: Landscape / Material
Since engine version: 5.1 OC

Description

Inserts a material pixel at the given position and given speed.

Syntax

bool InsertMaterial(int material_index, int x, int y, int xdir, int ydir, proplist out_insertpos);

Parameters

material_index:
Material to be inserted (see Material()).
x:
[opt] X insert position or offset
y:
[opt] Y insert position or offset
xdir:
[opt] horizontal speed of material pixel to be inserted
ydir:
[opt] vertical speed of material pixel to be inserted
out_insertpos:
[opt] If a writeable proplist is passed, members x and y are filled with the actual insertion position.

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