# FindConstructionSite

Landscape
4.6.5.0 CP
bool
id definition id of the desired building type.
int var_num_x Number of the variable in which the global x position of the site is to be stored. This variable should first be initialized with the x position for the start of the search.
int var_num_y Number of the variable in which the global y position of the site is to be stored. This variable should first be initialized with the y position for the start of the search.
Searches for a suitable construction site for a building of the specified type, starting at position Var(var_num_x)/Var(var_num_y). If a site is found, the coordinates are stored in the two specified variables and the function returns true. Otherwise, the function returns false.
Var
(0)=GetX(); Var(1)=GetY(); if(FindConstructionSite(HUT3, 0, 1)) CreateConstruction(HUT3, Var(0), Var(1), GetOwner(), 1, 1);
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