Determines the background material type at the specified position in the landscape. Returns a material index which can be used for comparison e.g. with
Material. For sky background the function returns -1. The background material is the material that a pixel is replaced with when it is digged away or blasted free.
This functions only processes static materials - moving material pixels such as rain or snow are not evaluated.
if(GetMaterial(0, 0) == Material("Water") && GetBackMaterial(0, 0) == Material("Water")) Message("I am in a neverending stream of water!");
Part of a clonk script: if the clonk is swimming in water that is replaced with water when it flows away, a message is displayed.