Questions concerning build orders

Questions concerning build orders

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Questions concerning build orders

Post by submarine »

i´ve got the following problem:

my ai seem´s to only start constructing a building, when the buildplace is within the range of the construction unit

do i have to move them to the construction site before giving the build order?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

When NTAI gives a cosntruction order the unit seems to move there of its own accord before building. And its the same with JCAI
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

ok thnx, i just wanted to build some solar plants (search radius 50.0m minDist 5) but the ai never builds more than two; my debug class tells me that the build order was given but the commander would have to move to reach the build site; but he´s just standing around and doing nothing
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

How are you checking the build rodr ws given? And are you checking that closestbuildsite functions isnt returnign an error?
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

sorry for bothering you, that was exactly the case...

the search radius was too low

now it works perfect (at least it builds a lot of solar plants in circles *g*)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Usually that happens in case a build position was blocked or just at all unusable. You might want to check the GetCurrentUnitCommands() a few frames after you gave the order, that way you can check if it's actually going to be build.
I've also found a general problem with springs pathfinding, that could be it as well. Sometimes units are just stuck if they're next to a building, and the target position is on the other side of that building. I would really like it if SJ could look into this, because I'm totally unknown with the pathfinding system.
Post Reply

Return to “AI”