Drive to - command (station) question

renevandervelde

New member
I am running trainz 2009 and 2010. Both of the programs have the 'drive to' or 'navigate to' command.

The 'drive to' command has the possibility to drive to a certain station and platform.
My question is this: currently i need to exactly pinpoint to which platform the train should drive within the station. However, I would like to instruct the program via the 'drive to' (or similair) command and the AI interface to drive to a station, but to decide themselves which platform is currently free at the given station. Is this possible?

(Of course i do know that it is possible to have a general track mark in front of the station before the track splits up into the several platforms, but if i let the train drive to the general trackmark there is still the problem of driving towards a current free platform. I cannot set trackmarks for all platforms and let the AI drive to those tracksmarks, since in that situatie I would still decide which train comes at which platform... ;-)

Concurrent question to the drive to command:
Currently, if i place a standard build-in station which consist of 2, 4 or 8 tracks, and if I oise the DRIVE TO command, the train actually stops as soon as the cabin reaches the beginning of the platform.
The doors of the train would then open (command LOAD PASSENGERS ETC), which looks a bit silly.
Is there a way to adjust the exact point (the middle of the platform) at which the train should stop?

Many questions.. Hoping to get some answers here from my fellow trainz enthousiastics :)

Rene
 
Rene,

Welcome to the Trainz forums and to the very addicting world of Trainz and its operations!

Regarding driving to a station, the interactive stations should work properly without a trackmark. Choose Drive To..., pick your destination, and then the Load command. The load will tell the AI to open the doors and load and unload the passengers.

Regarding the random platforms, I think others have asked the same questions, but I don't recall the answer which I think is useful as well. It would be nice to see the AI pull into any platform, unload, then continue on their journey. The solution to this maybe triggers and scripts, but I've never dabbled very far into triggers, and I am not a programmer so never got very far with the scripts.

I hope I answered some of your questions, and I'm sure the others here will be of help as well.

John
 
Rene, I don't know of a rule to do exactly as you're asking, but there is one on the DLS by "pguy" called "drive to trackmark list" Using this you could put trackmarks at the end of each platform and have the AI follow that command instead. if you then gave them a "wait for" command the passenger enabled coaches would auto load themselves.

Andy

P.S. I haven't actually tried this rule, I just know it exists
 
The loco will always stop one car length short of the trackmark so position the trackmark just beyond the platform.

William
 
Left or right handed driven station

I just thought of the following. I use a certain group of stations from the builtin station set of Trainz 2010 EE.
Could it be that that specific set of stations is made for a left-hand driving country? If that is the case it would perhaps explain why all my trains stop with the cab at the first stone of every platform.

Let me explain:

x = track
- = platform
C = Cabin driver
T = rest of the train

xxxxxxxxxxxxxxxx ------------------- xxxxxxxxxxxxx
...................................................CTTTTTTTTTTT.....

and
...........TTTTTTTTTTC..............................................
xxxxxxxxxxxxxxxx ------------------- xxxxxxxxxxxxx

This is the way my trains stop at the stations resulting in the open doors command to look a bit funny, having all passengers to 'walk' to the station from the tracks ;-)

Could it be that stations are designed for either left or right hand driving and thus mixing up stations for the 'wrong' country would cause this effect?

If so, can i change the place where the train actually has to stop?

Rene
 
The standard command sequence for a passenger station is:
DriveTo Station
Load

The DriveTo command drives to the beginning of the station, the Load command move the train to the stop position of the station and does the loading.

Peter
 
Doing the right commands

Yes, thank you. These are actually the commands that i use, but the loading takes places OUTSIDE the station. It is as if the station is indeed in the wrong direction.
As soon as the cab reaches the first part of the platform the script LOADING should take over and bring the train all the way into the station, but in stead, the script starts with the loading of passengers as soon as the trainz stop at the station.

I will have to do some more expirementing with some other stations. Currently i only have 2 stations that show up all the way in the route. These could be the WRONG stations.

Any suggestions for an 8 track terminus station?

And about the 'go to any platform within the specified station' command? Does sucha script exist? I cannot find it, but i think that i will defenitly not will be the first one with this idea ;)

Rene
 
Rene,

The station loading issue you describe here may have to do with with the stations you are using. Some of the older ones had problems like this particularly with short consists such as those run with DMU trains.

Regarding an 8-track terminus. Try building it yourself using Andi-06's Invisible Stations. He built a "kit" of parts that can be used to make all kinds of stations, and included is an 8-track station. He supplies the invisible platforms, splines, and other parts so you can make it any size you want. You can use low-level platforms should you choose to by lowering the invisible platforms for the station. There are all kinds of canopy splines and even glass roofs if you want to go that far. You can even make a larger station by combining stations together. The tracks can be numbered anyway you need to. He supplies a special drive to command to handle this situation.

With Andy's stations, short consists such as a DMUs, the train will stop in the middle of the platform. Engine driven trains will pull up and past the platform, for through, or stop at the end of the platform for a terminus.

Hope this helps!

John
 
Done!

John,

This was a perfect advice. I downloaded the station kit and indeed you are able to perfectly fit all things into the station including the right stopping and arrival points.

Only thing (wish) is still that we would be able to send the train to just the STATION, while NOTE providing the exact platform. I asked that question in the seperate forumentry that describes the station package.

For now: excellent advice!

I owe you one (or 8, since i can now build an 8 terminus ;-)

Rene
 
In theory, and from comments in the description and code, it seems like there might be code to navigate to a station, but not to a specific track at it, that is already in the Navigate To command. Right now I think it would only work for stations that don't have specified tracks. Assuming the code actually does work. It wouldn't take a lot of work to enable that for any station, however getting the modified command to co-exist with Navigate To is beyond my current knowledge.

Another method of doing what you want, in theory, would be to have a train drive to a specific trackmark and hit a trigger along the way which would have a script that would change the train's commands, (is that possible?) directing it to a specific platform that would be open.

Not sure the best way to tell what platforms are open, but one way might be to use triggers to detect when a train enters and leaves a platform and adjust some sort of global variable. (Assuming Trainz has such things.) This setup would pretty much have to be tailored for each station it's applied to. Again, this is all theory since I don't know a whole lot about the scripting language yet, though I do know it supports C/C++ style if/else which would likely be needed for this.

Depending on the routing, what functions are available, and the skills (and patience) of the script coder, it might be possible to specify different platform priorities depending on the specific train and/or the train's approach direction.
 
You could place TM's on the track before the platform and use the drive to trackmark list command this would be followed by the trigger schedule command where the schedule would be load at platform ***.
 
Just an "off the wall" idea 'cos I have not tried it: How about putting track markers on all platform stopping points and then name them all the same? Telling the AI crew to go to the marker that is repeated could then produce a dilemma in which they just might go to the nearest "available" one?

Just a thought.

Colin.
 
Back
Top