Road depot has no exit road

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
SummerBulb
Engineer
Engineer
Posts: 24
Joined: 06 Feb 2010 22:12

Road depot has no exit road

Post by SummerBulb »

Hi,

I build a road depot using this code:

Code: Select all

AIRoad.BuildRoadDepot(xyLocation, xyLocation + AIMap.GetTileIndex(0,1))
The depot is built, but has no exit road (see attached picture).
The depot is build next to an existing road. When a user builds a depot like that, it automatically builds the exit road for him.
Why doesn't it build it for the AI?

Thank,
SummberBulb
Attachments
Road depot is built with no exit/entry road.
Road depot is built with no exit/entry road.
Brumi
President
President
Posts: 921
Joined: 18 Jul 2009 17:54

Re: Road depot has no exit road

Post by Brumi »

I cannot explain why it is like that, but this can be easily avoided. Just make sure you build the connecting road before the depot.
SummerBulb
Engineer
Engineer
Posts: 24
Joined: 06 Feb 2010 22:12

Re: Road depot has no exit road

Post by SummerBulb »

Brumi wrote:I cannot explain why it is like that, but this can be easily avoided. Just make sure you build the connecting road before the depot.
But:
1. A user doesn't have to do it. The game does it for him.
2. how can i build only on half a tile?
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Road depot has no exit road

Post by Yexo »

SummerBulb wrote:2. how can i build only on half a tile?
You can build over the depot entrance, that roadbit will be ignored.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 6 guests