Page 1 of 1

FindClosestBuild site and IsPossibleToBuildAt issue

Posted: 22 Jun 2010, 15:25
by SiriusDragon
Hello again everyone,

I'm having some issues with FindClosestBuildSite and IsPossibleToBuildAt.

What happens is that those 2 functions are saying a particular position is buildable, but when the build order is given to the constructor unit, the constructor just stands there and won't make the building.

It only happens in specific situations it seems, I can reproduce it on one particular map however. The map is Comet Catcher Remake v02, and it's in the bottom left start position. There's a small hill near where the AI starts, it attemps to build the aircraft factory near to that hill.

Any suggestions on what I may be doing wrong?

Edit: I think this issue is a bit different to the one I was having before, as before it was trying to chuck buildings on top of each other.

Re: FindClosestBuild site and IsPossibleToBuildAt issue

Posted: 22 Jun 2010, 17:23
by AF
It could be a bug which Ive been getting complaints about that can happen to human players, but lets leave that as a last resort.

Can you show us a screenshot of the build order and the builder it is given to?

Re: FindClosestBuild site and IsPossibleToBuildAt issue

Posted: 23 Jun 2010, 04:24
by SiriusDragon
OK, I'll try and take a screenshot of the bug tonight.

It happens to the AI's commander right at the start of the game.

It manages to make 2 mexes and 2 solars before getting stuck with this problem.

I guess I should start a game up, and see if I can build anything at that point - that'll help narrow it down.

Re: FindClosestBuild site and IsPossibleToBuildAt issue

Posted: 03 Aug 2010, 11:19
by LoidThanead
I've had this issue in the past, and I believe the problem was that the commander itself was blocking the build site. Try moving the commander away a bit before building and see if it helps.

Of course, if so, there's a bug in either the canBuildAt or the algorithm that handles the actual building should move the unit out of the build zone.

Re: FindClosestBuild site and IsPossibleToBuildAt issue

Posted: 03 Aug 2010, 16:59
by AF
I encountered the issue in Ntai of building failing because the builder itself blocked the position.

A quick solution is to offset the build location in a random direction by the largest dimension of the builders footprint, or a set value, so the search would fine the position next to the builder, nit the position of the builder itself, dramatically increasing the chances if the builder simply moving out of the way