"Order distances are not supposed to be compared to map dis"

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
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

"Order distances are not supposed to be compared to map dis"

Post by Kogut »

see http://hg.openttd.org/openttd/trunk.hg/rev/0dd74b0bb243

So how I am supposed to check whatever airplane X may fly from airport on tile a to airport on tile b?

It seems that current API requires wasting money on airport construction just to check whatever connection may exist.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: "Order distances are not supposed to be compared to map

Post by Yexo »

Contrary to what the documentation for ScriptOrder::GetOrderDistance says it also works on tiles that are not yet part of a station. This either needs to be made clear in the documentation or an alternative function that works like that should be created.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: "Order distances are not supposed to be compared to map

Post by Yexo »

My last post was wrong, the documentation already said it worked for every tile. However frosch still took the time to extend the documentation a little bit.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests