BuildStation station_id?
Moderator: OpenTTD Developers
BuildStation station_id?
Howdy,
Another noobtion ...I am trying to build my first bus station and the call needs a station id? How do I know the station id if it hasn't been built yet? If i just put in a number like 1 it does not error out, but that can't be right...right?
I tried to look at some of your code but am not seeing it...
Please advise,
Kev!
Another noobtion ...I am trying to build my first bus station and the call needs a station id? How do I know the station id if it hasn't been built yet? If i just put in a number like 1 it does not error out, but that can't be right...right?
I tried to look at some of your code but am not seeing it...
Please advise,
Kev!
I DO like a nice caboose...
Re: BuildStation station_id?
Please tell us what code you tried to use. Then we can give you advice without having to write an essay.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: BuildStation station_id?
The station ID is for distant-join, i.e. if you want to join the station with an existing one.
Use AIStation::STATION_NEW for a completely new station.
Use AIStation::STATION_NEW for a completely new station.
NoAI API docs wrote: station_id The station to join, AIStation::STATION_NEW or AIStation::STATION_JOIN_ADJACENT.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: BuildStation station_id?
Frosch,
Thank you for a short to the point response that actually answers my question! You have my eternal gratitude...
I will now try using AIStation::STATION_NEW in my BuildStation call.
I have a feeling I may need to get a loan before I can build anything?
Kev!
Thank you for a short to the point response that actually answers my question! You have my eternal gratitude...
I will now try using AIStation::STATION_NEW in my BuildStation call.
I have a feeling I may need to get a loan before I can build anything?
Kev!
I DO like a nice caboose...
Re: BuildStation station_id?
Howdy,
Uh...just for the record...where exactly in the API documentation would I have found that?
AIStation::STATION_NEW
Annoying noobs want to know,
Kev!
Uh...just for the record...where exactly in the API documentation would I have found that?
AIStation::STATION_NEW
Annoying noobs want to know,
Kev!
I DO like a nice caboose...
Re: BuildStation station_id?
You can find it here, it is what frosch has quoted.
You don't need to take a loan first if the bus station is the only thing you build so far, check the error with
Do not forget to set the current road type first:
You don't need to take a loan first if the bus station is the only thing you build so far, check the error with
Code: Select all
AILog.Info(AIError.GetLastErrorString());
Code: Select all
AIRoad.SetCurrentRoadType(AIRoad.ROADTYPE_ROAD);
Re: BuildStation station_id?
Ha Ha! I just needed to Scroll down in AIRoad? I was gonna brag about finding it in the AIBaseStation section...I feel like a noob!
It's working! Thanks...
You are ALL awesome,
Kev!
It's working! Thanks...
You are ALL awesome,
Kev!
I DO like a nice caboose...
Who is online
Users browsing this forum: No registered users and 33 guests