GetPXSCount

Kategorie: Landschaft / Material
Ab Engineversion: 2.0 OC

Beschreibung

Determines how many loose pixels (PXS) are present of a given material in a given rectangle.

Syntax

int GetPXSCount(int material, int x, int y, int wdt, int wdt);

Parameter

material:
[opt] Index of material. If nil or -1, any material is counted.
x:
[opt] Left side of search rectangle. Offset in local calls. Set to nil to search the whole map.
y:
[opt] Top side of search rectangle. Offset in local calls.
wdt:
[opt] Width of search rectangle. Right border is not included in search.
wdt:
[opt] Height of search rectangle. Bottom border is not included in search.

Beispiel

if(GetPXSCount(Material("Snow"), -100,-100,200,100) > 5) Message("It is snowing!");
Part of a clonk script: if snow is found around the clonk, he shows a message above his head.
Siehe auch: CastPXS, GetMaterial, InsertMaterial, Material
Sven2, 2014-12