View topic - FindClosestBuild site and IsPossibleToBuildAt issue



All times are UTC + 1 hour


Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 22 Jun 2010, 14:25 

Joined: 21 Mar 2010, 07:13
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.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2010, 16:23 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
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?


Top
 Offline Profile  
 
PostPosted: 23 Jun 2010, 03:24 

Joined: 21 Mar 2010, 07:13
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.


Top
 Offline Profile  
 
PostPosted: 03 Aug 2010, 10:19 
User avatar

Joined: 27 Feb 2008, 16:16
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.


Top
 Offline Profile  
 
PostPosted: 03 Aug 2010, 15:59 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
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


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.