Activating TrackTrain by Team Cap

MegapiemanPHD

Doctorate in Deliciousness
aa
Mar 31, 2012
1,942
1,281
Right now I'm working on a KOTH map and my hope is to have it set up so at the start of the map both trainA and trainB are stopped. If Blue caps the point TrainA starts moving and will pass from one side of the map to the other, then teleport back to the original path and pass through the map again. If Red Caps TrainA finishes its movement through the map but won't start it again and TrainB's movement starts. I have a train set up and it goes through the map fine and I can set it up so that TrainA starts and stops depending upon who owns the Cap. What I can't figure out is how to make TrainA finish it's movement so that it doesn't stop its motion while in playable areas of the map but instead finishes going across the map, but then waits till Blue owns the point again. TrainB will be exactly the same but be controlled by Red capping the point. If anyone could help with this I would be grateful.
 

Idolon

they/them
aa
Feb 7, 2008
2,107
6,116
Instead of telling the trains to stop, set up a system to make each train check if it should stop on OnPass from the first path_track.
 

henke37

aa
Sep 23, 2011
2,075
515
Add a new logic_relay, call it loopLogic.
Add a connection from the path_track for the OnPass output to the Trigger input of the relay.
Add a connection from the relay to the tracktrain to teleport the train.
Then add logic to enable/disable the relay as needed.