AreZonesAt
From Spheriki
Check if there are any zones at a map location.
Contents |
[edit]
Usage
boolean AreZonesAt(x, y, layer);
- x number. The map pixel X coordinate to check.
- y number. The map pixel Y coordinate to check.
- layer number, non-negative. The map layer to check.
- boolean is returned,
trueif there are zones at the location,falseotherwise.
[edit]
Examples
To check if a person named 'Bob' is in any zones:
var x = GetPersonX("Bob");
var y = GetPersonY("Bob");
var l = GetPersonLayer("Bob");
if (AreZonesAt(x, y, l)) {
ExecuteZones(x, y, l);
// Do other stuff
}
[edit]
Notes
- At the time of writing, the
layerparameter is ignored, though it must still be valid.
- The map engine must be running for this function to work.
[edit]
See also
- ExecuteZones()
- MapEngine()
- Every other zone function in the Functions page.

