Alternate Path Tracks

Oct 6, 2008
1,948
446
Ok, I've seen them in Hammer, I've seen them work in various games TF2 HL, etc but does anyone know how they actually work and how you code them?

I would like a cart to go down track 1, then the next cart to go down track 2 ant then the next cart that comes along down track 1.

Basically I want to make some randomness in something repedative.

Or the first 4 carts do the above and then the 5th takes a diferent route from the other.

How do I code it - I'm not getting the expected results - thanks.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
Use the three AlternatePath inputs that the path_track has to control which one will be used. The default state is to use the main path, and when you send an enable input it switches to use the specified branch.
 
Oct 6, 2008
1,948
446
Ok if I'm getting it right

cart moves node 1 to node 2 onpass (node 1) alt path to node 3 so the next cart that hits node 1 goes to node 3 and then at node 3 I can use the cart passing to reset node 1 to send the cart to node 2?

Am I understanding this right?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
Yes. If you have node1's next target set to node2, with the branch path set to node3, then you can just put in the following output on node1

OnPass > !self > ToggleAlternatePath

Then every time something passes it will flop the track used for the next one.
 
Oct 6, 2008
1,948
446
Perfect Just got it working right! I now have alternate paths working for my death carts so people won't get used to it always going down the same track.

Thanks so much!!