path_track + func_tractrain tutorial?

I need to make a train for my map, and this train will go forward and backward with no curves.
Does anyone know of a tutorial to do this?

Shows how to make a lift using func_tracktrain. Try adapting this.



That worked perfect. Thank you.
I have 2 buttons though. One for forward, one reverse. How can I make it so when the train is moving forward, a player can’t just hit the button and make it reverse?

func_buttons can be locked from an input.
Set both the forward and backward buttons to lock both buttons a slight delay after one of them is pressed, then unlock them with another input at the next stop.

Ok. for the forward button i have this

Onpress, target: backward buton) input: lock

Will this wear off after the train stops?

Just have it so once the train passes the 2nd to last path it enables the button again and disables the other.
Add the output to the path_track:
onpass - button - disable.
onpass - button2 - enable.

Thank you very much!