Enjoy
Tutorial: moving trains
I. A. Place all track for the train (make a complete loop of track).
II. For this example the train will be made up of 1 LOCOMOTIVE, 2 TRAINCARs, 1 CARGOCAR.
A. Place the LOCOMOTIVE and CARs in a line on the track.
The units should be placed in the order that they will move to make editing easier. This means place the LOCOMOTIVE on the track, then place the TRAINCAR (second unit of train) that will follow the LOCOMOTIVE right after, then place another TRAINCAR (third unit of train) right after the first TRAINCAR, then place the CARGOCAR (the last unit of train) after the second TRAINCAR (third unit of train).
If you were to create a longer train, you would continue placing the rest of the cars in this way until the entire train is at desired length.
II. B.
1). Move the cursor over the second unit of the train (the first unit after the LOCOMOTIVE). In the lower-left bar of the program, the Vehicle's ID number is displayed. Remember this number.
2). Now click on the LOCOMOTIVE to bring up the unit Properties Box.
Set "Follows ID" value to: the number that was displayed for the second unit of the train.
The Follows ID value is the ID number of the unit that will follow this unit.
3). Set the direction of the unit so that front of it will face the direction that it will move on the track. Set the direction for all other units in this way.
0=Northeast, 32=East, 64=Southeast, 96=South, 128=Southwest, 160=West, 192=NorthWest, 224=North
4). Close the Properties Box by clicking on OK.
Steps 1 through 4 are repeated for the rest of the units except the last unit. If you need further directions to set the "Follows ID" value for other units, continue reading; otherwise go to Part II. C. for directions to set the "Follows ID" value for the last unit.
(1) Move the cursor over the third unit of the train and remember the number.
(2)Then click on the first TRAINCAR (second unit of train).
Set "Follows ID" value to: the number that was displayed for the third unit of the train.
(1) Move the cursor over the fourth unit of the train and remember the number.
(2) Then click on the second TRAINCAR (third unit of train).
Set "Follows ID" value to: the number that was displayed for the fourth unit of the train.
If you were to create a longer train, you would continue setting the "Follows ID" value for the rest of the cars in this way.
II. C.
1). Click on the CARGOCAR (last unit of train).
Set "Follows ID" value to: -1 (the Follows ID value for the last unit of the train is always -1 because no unit follows it)
III. A.
To make the train move with a script:
1). Place waypoint 10 in the same Cell where the LOCOMOTIVE is placed.
2). Place waypt 11 somewhere else on the track.
III. B.
Create a new Script (name it Trainmove) with actions in this order:
action type: 3 (move to waypt), Waypoint: 11
action type: 5 (guard area), Time units: 15
action type: 3, Waypt: 10
action type: 5, Time: 15
action type: 6 (jump to action #), #: 1
III. C.
Create a Taskforce (1LOCOMOTIVE) of 1 LOCOMOTIVE unit.
III. D.
1). Create a Team (Lteam):
2). Set Waypt to 10
3). Set House to the SAME House of the LOCOMOTIVE unit that is already placed on the map.
4). Uncheck all checks (so the boxes have no check mark in them).
5). Set the correct Script (Trainmove) and Taskforce (1LOCOMOTIVE).
III. E.
Create a new trigger with the following:
Event type: 13, Time: 10
Action type: 4 (create team, used to make a team with units already on a map), Team: Lteam
Depending on your FS version, you may need to type "1" in the box where it says static.
If you encounter errors when trying to play the map, check all settings again.
If you get an error when the map is loading and you used the "Prepare standard houses feature" when creating the new map, then go to Edit > Houses > then select the house of the human player and set "Player control:" to "yes" for that house.
This post has been edited by Wes.com: Jan 22 2007, 10:34 PM