(info) Other great resources: Official JS API docs, Scripting Forum

enumGateways()

* enumGateways(), gives array of objects with x1, y1, x2, y2 properties

3.2+ only


enumGateways()

Return an array containing all the gateways on the current map. The array contains object with the properties x1, y1, x2 and y2.

Gateways are special invisible marks on the map that hint AIs to build hardpoints on them. They are painted by the map maker (of course, some map makers are lazy enough to paint them). Each gateway is a line segment of adjacent map tiles. Nexus AI fills the whole line with best hardpoints available, except two middle tiles (any two middle tiles in case gateway has odd length); i guess any AI should do the same.

From: http://developer.wz2100.net/wiki/MappingTips#Botsandgateways

Gateways. Gateways are virtual one-tile-wide line segments on the map that hint AIs to build defenses on them. Gateways are usually stretched across the chokepoints. AI will build hardpoints on every tile of the gateway, except exactly two middle tiles; thus, if you make a gateway with odd number of tiles, it is not clear which two of these tiles will be left open. To paint gateways, use FlaME's gateway tool; delete them with shift+clicking. The following picture shows two gateway lines and the way bots will place hardpoints on it.