thanks will that work for Distance to Car Marker or just speed in general. All Consists have the distance to Car Marker whether it be 8 or 10 Cars.
Speed = "distance/time", not just simple distance, so speed is a different variable altogether.
The OS_ATS plugin was written for BVE4 long before openBVE, but does work with openBVE under Windows.
Distance variables available for use in openBVE .animated files include:
"distance" = Cartesian meters from object to closest car
"distance[carIndex]" = Cartesian meters from object to specified car. 0 if car does not exist.
"trackDistance" = +|- meters from object to closest end of train. Positive if train in front, negative if behind, 0 if object between train ends.
"trackDistance[carIndex]" = +|- meters from object to specified car. Positive if car center in front, negative if behind, 0 if car does not exist.
See this for more information on .animated variables:
http://web.tiscali.it/fopenbve/develop/object_animated.html#variables