AIRoad.CanBuildConnectedRoadPartsHere()

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

AIRoad.CanBuildConnectedRoadPartsHere()

Post by Zutty »

Hi all,

With respect to this function...

http://devs.openttd.org/~noai/aidocs/cl ... 68060814cf

A) I dont quite get what the first line means. Is it saying that it DOESN'T respect the build on slopes setting, i.e. whether its on or off the function will return the same?

B) Does it check to see if start can be connected to tile, or tile to end, or start to tile to end?

I have a bug in my AI which is related to this function, causing roads to be built incorrectly, but I wonder if I'm just using the function incorrectly rather than a bug in the API.

Thanks.
PathZilla - A networking AI - Now with tram support.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests