Posted: Tue Dec 26, 2017 12:33 pm Post subject:
Trouble with trains
So I've been messing with trains, and I've encountered this weird problem. I set the Follows ID correctly (triple checked it), but it seems that a large portion (5 cars) of my 9-car train gets left behind. It then moves after the first half (4-cars) reaches the first waypoint. I have attached in-game screenshots of the problem.
Train3.png
Description:
First half and second half eventually meet in opposite sides
Filesize:
3.29 MB
Viewed:
2248 Time(s)
Train2.png
Description:
Cars leave station after first half reaches waypoint
Possibly because a train can't have two train engines because the game is then confused?
I know nothing regarding train-logic, so apologies if this is overly stupid, but it's the only alternative I can come up with.
Also: Nice to see someone putting the TX-tracks to good use. Did you get the files from my (non-installer) version? _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
can't help there with that little info.
-what's the ini code of the wagons and locomotive?
-what's the tracks coding?
-speedtype settings
-terraintype settings
-map settings
-trigger settings
...
... _________________ SHP Artist of Twisted Insurrection: Nod buildings
Okay I feel stupid... Sorry for wasting your time everyone. I found that the train pathfinder had a problem with the location of the waypoint. The first half of the train probably found out that the path to the first waypoint was shorter at the route I want it to go to. The second half however, probably found a shorter way to the certain waypoint and thus, did not want to follow the first half of the train. Tested this by moving the waypoint closer. The whole train finally worked right.
I should probably exhaust all effort first before posting. Apologies, and thank you for the replies! QUICK_EDIT
And you're welcome for that lil' fix of mine
Out of curiosity: this for YR? Doesn't look like it... _________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
Yeahp! It's for Yuri. The map still needs a lot of work. I attached the map below. I'm heavily editing the map [TW2] Colossus for use in a private mod.
Okay I feel stupid... Sorry for wasting your time everyone. I found that the train pathfinder had a problem with the location of the waypoint. The first half of the train probably found out that the path to the first waypoint was shorter at the route I want it to go to. The second half however, probably found a shorter way to the certain waypoint and thus, did not want to follow the first half of the train. Tested this by moving the waypoint closer. The whole train finally worked right.
I should probably exhaust all effort first before posting. Apologies, and thank you for the replies!
no, that can't be the case.
Wagons are passive and don't do any pathfinding on their own, since they also can't move alone. Follows ID makes them follow the locomotive, which is the only unit that does the pathfinding and also sets the speed for all following units.
What could happen is, that you haven't placed the wagons correct.
e.g. a wagon looks almost the same facing forward and backwards
if you place some backwards, they would have to rotate 180° on the spot, which wagons and trains can't do.
Though hard to tell without the map
Listing some things i've noticed:
-House Civilian doesn't exist (normally). WW made a lot of coding mistakes themselves and this is one of them. There are only Neutral and Special house for civilians.
No clue why FinalAlert even offers that house on the Team settings, when this is nowhere defined in rules.ini
-you use house America for your trigger. if no player in the map is using that house (i assume it's a multiplayer map), this would cause a crash.
Use Neutral or Special and make sure at least one building belonging to that house is placed on the map, so the house actually exists when the trigger is fired.
-You use Group 0 for the task force etc. Make sure only your locomotive has Group 0 set and not the wagons as well. You want only the locomotive to follow your script and not have your wagons follow their own script.
-give your train and wagons SpeedType=Track, since Tracks usually have Land=Railroad, which in turn has 100% speed for Tracked vehicles. You don't want the engine to assign them wheeled and have them move only at 50% of your set speed.
RA2 is stupid as every land unit has the SpeedType key missing and thus all units use wheeled speeds, which is boring. That's a reason why RA2 sucked for me (no diversity on the units or the terrain). But that's offtopic.
-IsTrain=yes alone is only to be assigned to the locomotive! Wagons and other things like your end locomotive have to get in addition Passive=yes
This is probably why your wagons refuse to stupidly follow the locomotive and do their own stuff.
[Locomotive]
IsTrain=yes
[Wagon]
IsTrain=yes
Passive=yes
Can't tell anything if the tracks, Railroad landtype and the map are done right. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Ah, thanks. I'll make the changes to further prevent any other errors. Thank you for this! I attached the map above, just in case you want to take a look. QUICK_EDIT
However, i noticed on the screenshots that your corners are too sharp. This can cause a train to disconnect as well.
A train needs only smooth corners, which don't need a unit to stop and rotate on the spot.
In other words, make sure to add a straight piece after each corner piece. 2 corner pieces following each other don't work. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I've also had the same problem with only half of my train moving & I also fixed it it by moving the move-loop waypoint further away from the train. I think if the waypoint is within the trains turning circle then the carriages think they are close enough & dont bother moving. _________________
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