Category: Landscape / Material
Since engine version: 4.0 OC
Returns the name of the texture used for the material at the given position.
string GetTexture(int x, int y);
- X coordinate at which to check the texture. Offset in local calls.
- Y coordinate at which to check the texture. Offset in local calls.
func ControlUse(object clonk)
var tex_name = clonk->GetTexture(0,0);
var tex_color = GetAverageTextureColor();
clonk->SetColor(tex_color); clonk->PlayerMessage(clonk->GetOwner(), "Camoflaging Clonk to look like %s", tex_name);
A script for a carmoflage item. When used, the clonk's overlay color is set to the average color of the texture where he is currently standing and he announces the name of the texture he is carmoflaging as.