I don't think you can script a train to switch waypoint paths. Also, making a fork in waypoints doesn't allow the train to alternate between them. The train will just pick one directions & continue to go that direction each time the train gets to the fork. What you can do is overlap a waypoint path for the train, that way when you get to a fork in the track & having two paths coming from the same track, you can have one path go one way & another path go the other way. But make sure to have these paths in the same loop. This picture is how it should look:

[size=1]
If you want to have a train go to a specified area, you'll have to use multiple trains, each going to separate bases & back. You can use the action,
Unit\Set a train to stay at a station. TRUE = stay. FALSE = go-ahead[333] or the
Unit\Move\Set a unit to help in place, ignoring Physics, Locomotor, etc. to get the train stay at the players base. This is the script EA used to get the train going again since there is no condition like, Unit has full contents:
🅱*** IF ***[/b]
🅱Unit 'TrainCar1' has free container slots.[/b]
*** OR ***
Unit 'TrainCar2' has free container slots.
*** THEN ***
Null operation. (Does nothing.)
🅱*** ELSE ***[/b]
🅱Set Flag named 'Go Train Go' to TRUE[/b]
'MisUSA01xEva05' plays, allowing overlap FALSE (true to allow, false to disallow).
Disable Script 'Check the Train'.
The bold text is all that you need to pay attention to. But you don't need to use a flag like EA.
Two more things, I've just recently found out that you don't need to use a Map.ini file to make a train car garrisonable. The TrainCar04 is already garrisonable from default.
Also, don't edit a post in responce to a future post. You should just create a new reply.
Edited by user
18 years ago |
Reason: Not specified