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.
It's me again. You guys are great, so I am back with another question....
I get a station id from AIStationList(AIStation.STATION_AIRPORT)...but when I AIStation.GetLocation() on it...I get the location of the attached bus station... Is there an easy way to get the top tile of the airport? Cuz I need to upgrade it. Some non brute force method?
Please advise,
Kev!
P.S. Today is the anniversary of my birth, so be nice to me?
- grab tiles around your station
- valuate them with AIStation.GetStationID
- KeepValue(yourstationid) // if you follow the logic, now you have all tiles that belong to your stationid
- Valuate(AIStation.HasStationType,AIStation.ROADTYPE_ROAD)
- RemoveValue(1);
- Sort(AIList.SORT_BY_VALUE,false);
- first tile is at Begin()
I don't know if we have an easier way, but it's pretty simple like that already.
Happy birthday
Often undervalued, but I truely appreciate that you post the solution also and especially when you found it yourself - others still might profit from it