Trigger to check car variable?

Matt996

Member
I'm trying to create a hump yard scenario. The goal will be to set the switches and pull the pins to coast cars to the correct tracks. Each correct car will add a point to a score variable, each wrong car will subtract a point.

I'm not sure how to check the cars on each track, though. I'm thinking a trigger at the first retarder (each track has a slowing retarder at the entrance and a stop retarder at the exit), but what would it detect and how?
 
One way that could work is to write a rule that checks for vehicles on both sides of a trackmark that you have placed in each spur of the yard. The rule would have to be configurable as to the required vehicles there. It could also be directional.

Pitkin
 
Yeah... that's a bit beyond my current abilities. I understand programming, but the Trainz documentation seems to be rather incomplete and obscure.
 
Add a trigger and a check consist rule. Not sure what the exact name of the rule is, but I used it in one of the first two sessions I ever uploaded to DLS.
I’ll try to remember to look it up when I am on my home pc later today.
 
What criteria are you using to determine the track to which the car should be routed? By industry destination? Direction of travel for next leg of journey? Color of car? Type of car? Owner of car? Other criteria?

Do you want to make the determination each time a car is humped, or do you want to check the string of cars when it is pulled from the classification track?
 
The cars are sorted during humping. Basically, I want to increment a score variable whenever a car is sent to the correct track, and decrement it when a car goes to a wrong track.

I haven't worked out how to do the sorting yet. That's actually one thing I was hoping for some ideas about. Ideally, it should be by destination. I had thought of naming cars by destination (New York 0012, Atlanta 0314, Chicago 1720, etc.) and checking the car name. That seems the easiest way. My thought was to have a trigger at the hump end of each track -- maybe combined with the directional retarder trigger -- that checks if the car is correct or not. I have no idea how to implement that.
 
Back
Top