Page 1 of 1

Questions concerning build orders

Posted: 13 Oct 2005, 21:02
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?

Posted: 13 Oct 2005, 21:11
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

Posted: 13 Oct 2005, 21:23
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

Posted: 13 Oct 2005, 21:30
by AF
How are you checking the build rodr ws given? And are you checking that closestbuildsite functions isnt returnign an error?

Posted: 13 Oct 2005, 21:33
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*)

Posted: 13 Oct 2005, 21:36
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.