trains are made out of multiple parts:
the func_tracktrain
the model
the track_paths
and the kill trigger
basically you wanna parent the model to the func_tracktrain and also parent a kill trigger on the front with damage type set to train. then make the tracktrain follow a path and youre set.
note that youll also have to add a logic_timer if you want the train to show up randomly or in a set time interval. lastly, make the last pice of track teleport the func_tracktrain back to the start and also pauses it.
you can also download maps like well or freight to see how they made their trains, or just copy them:
Badlands • Byre • Granary • Graveyard Lumberyard • Nucleus • Offblast • Perks Ravine • Sawmill • Watchtower • Well Altitude • Brew • Carrier • Coal Pit DeGroot Keep • Dustbowl • Egypt • Erebus Frostwatch • Gorge • Gorge Event • Gravel Pit Hardwood • Junction • Lava Pit • Mann Manor Mercenary...
tf2maps.net