Continued from Page 1...
Now you might have noticed that in the single player game, there were some times when a train would simply get to a point and STOP. You couldn't go forward, just backward (or vice-versa). This is done with the "Disabled" flag. Switch to selection mode, and choose "stop4". Bring up the entity properties window, and in the "Flags", select "Disabled".
Compile and run your map, and test this new setup. NOTE: The tracktrain will simply refuse to go FORWARD past stop3, or BACKWARD beyond stop1. Its as if "stop4" doesn't even exist.
There's a trick that was used in the game to simulate a runaway train, and you can reproduce it rather easily. Switch to selection mode, and choose "stop4". Bring up the entity properties window, and in the "Flags", UNselect "Disabled". Then select "Disable train". (It really should be called "disable controls", but oh well.
Compile and run your map, and test the "runaway". NOTE: The controls are literally removed from the game until you re-load the map. BUT, external events can still affect the train - try activating the button, for example!
There's one last thing I want to show you; but its rather tough to describe accurately, so here goes: We've covered branching once already, but there are really TWO types of branchings: FORWARD and REVERSE. Here's an illustration to help:

We need to be able to clue the tracktrain in to when there is a REVERSE branch. We do this in much the same way as a normal branch; but there ARE some differences... so let's give it a try. Select stop4. Bring up the entity properties window. In the "Flags", UNselect the "disable train". Select the "reverse branch" flag. In the keys, set the "branch path" to "stop3". Now, select the "stop2" entity. In its keys, change the "next stop target" to "stop4". The purpose of this last part, is so that stop3 is its own little "island" branch of track. Going FORWARD or BACKWARD normally will make the tracktrain follow this path: stop1, stop2, stop4 (or stop4, stop2, stop1 if going backward). If the button is triggered, the tracktrain will go NORMALLY forward still, but if the player makes the tracktrain move BACKWARD, the tracktrain will get to stop4, and then move off to stop3, INSTEAD of stop2. After it moves to stop3, the tracktrain's movement won't appear to make sense, as there is no "further" track to follow (which there WOULD be in a "real level"). The key thing to "get" in this is that the tracktrain is ONLY affected when moving backwards.
Compile and run your map, and test this.
Well, that about wraps it up for this time with the func_tracktrain entity. As you can see, there are lots of possibilities; and even some we didn't cover today. I will be releasing a "follow-up" tutorial to his that will resemble the "light" tutorial in structure. It will cover the more advanced tracktrain features, such as track-change devices (those "spinning elevator" spots when in your tram at the beginning are good examples) and more. Hope you enjoyed this; and good luck with your "model train sets"!
As always, feel free to email me any comments, questions, or problems!