# FindConstructionSite

Landscape
5.1 OC
array
id definition id of the desired building type.
int x Designated x-position of the construction site. Always global coordinates.
int y Designated y-position of the construction site. Always global coordinates.
Searches for a suitable construction site for a building of the specified type, starting at the specified position. If a site is found, the coordinates are returned in the array [x,y]. Otherwise, the function returns `nil`.
var xy; if(xy = FindConstructionSite(ToolsWorkshop, GetX(), GetY())) CreateConstruction(ToolsWorkshop, xy[0], xy[1], GetOwner(), 1, true);
Searches a construction site for a hut, starting at the local position. If a site is found, construction is started.
CreateConstruction
Var
SetVar
Sven2
2001-11