AITile::LevelTiles
Posted: 02 Aug 2009 20:07
Hello everybody,
I have a question regarding the AITiles.LevelTiles function.
In the NOAI documenten it states that it returns:
"True if and only if the area was completely leveled. "
But I discovered some weird behavouir, when testing my AI. It seems that the function returns still true even if only some of the tiles got leveled, because in this example the Coal Mine is in the way.
I attached an image which illustrates the behaviour.
The two signs labeled "LS" and "LE" (the "LE" belongs to the sloped tile blow the sign itself) mark the first and last tile, which were given to the function as parameters.
In the debug log after "Building station 1!" you see the output of the AIError.GetLastErrorString() function and the the line after that the return value of the AITiles.LevelTiles function ("ret true").
The station was built after AITile.LevelTiles returned true.
Thanks
I have a question regarding the AITiles.LevelTiles function.
In the NOAI documenten it states that it returns:
"True if and only if the area was completely leveled. "
But I discovered some weird behavouir, when testing my AI. It seems that the function returns still true even if only some of the tiles got leveled, because in this example the Coal Mine is in the way.
I attached an image which illustrates the behaviour.
The two signs labeled "LS" and "LE" (the "LE" belongs to the sloped tile blow the sign itself) mark the first and last tile, which were given to the function as parameters.
In the debug log after "Building station 1!" you see the output of the AIError.GetLastErrorString() function and the the line after that the return value of the AITiles.LevelTiles function ("ret true").
The station was built after AITile.LevelTiles returned true.
Thanks