// get a list of all enemies within 10 tiles of (20,30)
var results = enumRange(20, 30, 10, ENEMIES, false);
results.forEach( function(gameObject) {
switch (gameObject.type) {
case DROID: {
// do stuff with droid
break;
}
case STRUCTURE: {
// do stuff with structure
break;
}
}
} );
Availability 3.2+
Requires:
Warzone 3.2 or above
Contents
Jump to:
See also
Related articles:
enumArea() – list objects within a certain area of the map