Strange AI Building Placement Problem
Posted: 19 Jun 2010, 08:03
Hi world,
I could be doing something dumb with this, I don't know... basically what happens is that my AI builds the following:
1. Mex
2. Solar
3. Solar
4. Aircraft Plant
BUT it gets stuck with number 4. What seems to happen is that after making number 3, it picks a build spot right up against that building for the Aircraft plant. Obviously that won't work or fit so it fails.
I'm using the AI API function (FindClosestBuildSite) to find the build site, so I'm not sure why it's picking such a bad build site for that specific building.
The parameters I'm passing to that function are as follows:
unit def = unit def of the aircraft plant
pos = current position of the commander
search radius = 8192
minimum distance = 32
facing = no facing
The mod I'm using is BOTA 1.6, and the API is the new C++ API.
Any ideas on what I could be doing wrong? I simply want my AI to make those few buildings, so I can then get the factory to make some air scouts.
I may try shuffling the build order and put the Aircraft Factory first, but that seems like more of a hack than a proper fix.
Thanks for any help!
I could be doing something dumb with this, I don't know... basically what happens is that my AI builds the following:
1. Mex
2. Solar
3. Solar
4. Aircraft Plant
BUT it gets stuck with number 4. What seems to happen is that after making number 3, it picks a build spot right up against that building for the Aircraft plant. Obviously that won't work or fit so it fails.
I'm using the AI API function (FindClosestBuildSite) to find the build site, so I'm not sure why it's picking such a bad build site for that specific building.
The parameters I'm passing to that function are as follows:
unit def = unit def of the aircraft plant
pos = current position of the commander
search radius = 8192
minimum distance = 32
facing = no facing
The mod I'm using is BOTA 1.6, and the API is the new C++ API.
Any ideas on what I could be doing wrong? I simply want my AI to make those few buildings, so I can then get the factory to make some air scouts.
I may try shuffling the build order and put the Aircraft Factory first, but that seems like more of a hack than a proper fix.
Thanks for any help!