GetTexture

Kategorie: Landschaft / Material
Ab Engineversion: 4.0 OC

Beschreibung

Returns the name of the texture used for the material at the given position.

Syntax

string GetTexture(int x, int y);

Parameter

x:
X coordinate at which to check the texture. Offset in local calls.
y:
Y coordinate at which to check the texture. Offset in local calls.

Beispiel

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.
Siehe auch: GetAverageTextureColor, GetBackTexture