Hi.
New to AIs.
If i want to build a road, using pathfinder.
Lets say the function that builds the road is called BuildRD();
I there a way, using TestMode, to check how much the whole thing will cost me (without building the road, of course)?
I can set the TestMode and check if the build was successful. But hoe do i get the cost?
Thanks,
Bulb.
Building roads and TestMode
Moderator: OpenTTD Developers
Re: Building roads and TestMode
Hi SummerBulb,
You can use the following code:
Good luck with your AI! 
Bram
You can use the following code:
Code: Select all
local bla = AITestMode();
local accounts = AIAccounting();
BuildRD();
local totalCost = accounts.GetCosts();

Bram
Who is online
Users browsing this forum: No registered users and 7 guests