It should go aorund Azeroth and you should be able to load your units and gain control over the train. It could belong to an allied player who everyone can control: Azeroth Railway.
See old issue which is too complicated: #1003
The train should regenerate health and mana of all cargo units over time so you have some reason to use it.
Maybe add a maximum of cargo units?
Allied player with shared control: Azeroth Railway. The locomotive could also change to the player who has cargo in it.
One train with 3 wagons with 10 cargo space each or custom cargo by pausing/hiding/making unit invulnerable.
Pieces are Doodads with rects. Each rect has an angle for both directions (auto calculated by + 180 mod 360).
There are stoppers with properties like: from direction, time, auto turn. You can enable auto turn at stoppers via stations. https://en.wikipedia.org/wiki/Buffer_stop
You can play the horn.
Ground units/water units could be killed by the moving train?
Detect the current rect of the cart:
event entering region
assign region index to the cart via hashtable.
hook RemoveUnit to remove cargo which does not exist anymore.
Acceleration/Velocity/Speed: The train should have a speed starting with 0 and increasing over time. The speed increases the distance it moves per interval. The speed should decrease when it is near the station, so it looks like it will slow down. The distance between the train's position and the station can be calculated by adding the distance of the current rect and all further rects up to the stop point. To be more accurate, it could also calculate the exact distance if rects are overlapping.
Derail: If a cart leaves a rect it can be reset on it or the train is reset in total to a starting location or destroyed forever?
Levers could allow changing the track direction if multiple ways are possible.
Blockers could turn the direction automatically and restart the train.
It should go aorund Azeroth and you should be able to load your units and gain control over the train. It could belong to an allied player who everyone can control: Azeroth Railway. See old issue which is too complicated: #1003
Lore
Concept
Detect the current rect of the cart:
hook RemoveUnit to remove cargo which does not exist anymore.
SetUnitAnimationByIndex
.Concept for a dynamic builder system
Sounds
Resources
Systems