- Joined
- Jan 11, 2009
- Messages
- 3,414
Hello everyone! I've been posting quite a few threads lately, but i've run into a few tasks i've never had to deal with before, so here it goes.
I am trying to make a custom-made AI for a map, and so far it is looking really well. My only problem right now is, when ordering an AI worker to build a shipyard, i don't know where you can and cannot build it.
With other structures, it is easy to just test a number of points in a circle around the workers location to find one where it fits, but with a shipyard it ain't so simple, as it has to be placed at the shore. My first thought was to place a kind of dummy shipyard at the workers location, hoping it would snap to the nearest pathable point, like units sometimes do so that i could trace its new location. This did not work however, and instead i just had a shipyard on dry land. Anyone has any good ideas on how to solve this?
I am trying to make a custom-made AI for a map, and so far it is looking really well. My only problem right now is, when ordering an AI worker to build a shipyard, i don't know where you can and cannot build it.
With other structures, it is easy to just test a number of points in a circle around the workers location to find one where it fits, but with a shipyard it ain't so simple, as it has to be placed at the shore. My first thought was to place a kind of dummy shipyard at the workers location, hoping it would snap to the nearest pathable point, like units sometimes do so that i could trace its new location. This did not work however, and instead i just had a shipyard on dry land. Anyone has any good ideas on how to solve this?