:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Thu Oct 19, 2017 10:38 am
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Tutorials Factory
How to add a moving train to your map (****)
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Dec 13, 2012 7:51 am    Post subject:   How to add a moving train to your map (****) Reply with quote

How to enable a moving train by AmonRa

I think alot of people are having truoble with trains so i thought it should be posted in the modding tuts forum i dont know who made this tut but
I think it was DJBREIT and i also added my own section to make the human player control only the loco but the train will still follow and will be able to be loaded and unloaded with infantry

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 "Flag 4" (in later/latest ver of FS its Follows ID) value to: the number that was displayed for the second unit of the train.
The F4 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 "Flag 4" value for other units, continue reading; otherwise go to Part II. C. for directions to set the "Flag 4" 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 "Flag 4" 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 "Flag 4" 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 "Flag 4" value for the rest of the cars in this way.

II. C.
1). Click on the CARGOCAR (last unit of train).
Set "Flag 4" value to: -1 (the F4 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. NOTE: do not put them too close to each other and dont put them to close to the maps edge in cityscape i had a prob with the right train stopping on the second waypoint maybe because i added a few cars to the train

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 (=1 Sec)
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.

AmonRa - Making a Train Loco controlled by the player but the rest of the train wont be but will still follow the train and will be able to be Loaded\UnLoaded with Infantry

first make make two teams GDI and GDI2 or anything like then change the locomotive team to your team(GDI) and the train cars to the other team (GDI2) make the two allies and put the trigger teamtype and task force to your team(GDI)

there is a problem tho sometimes some of the cars get out of sync (some times the train cars continue without the loco or stop and the ones behind him continue but i think it happens only when you order the loco off a railroad or make an emergency brake (Stop Key) if this happens order the loco to move a bit forward and the train will return to theyre order)


This tutorial is sponsored by tibweb.

Key Words: #Tutorials #Mapping #TiberianSun #Firestorm #FinalSun 

_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Tutorials Factory
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1030s ][ Queries: 11 (0.0050s) ][ Debug on ]