Get locomotive position in train
Posted: Mon Oct 26, 2015 11:10 am
I want to get the positon of a locomotive in relation of the train. Let's assume there is a train with the following layout:
With the Lua/Train interface one gets both locomotives:
What I want is the information, that Foo is at position 1 and Bar is at position 4. Any chance to get this information?
Code: Select all
<Foo] [cargo] [cargo] <Bar]
Code: Select all
{
front_movers = {
[1] = {backer_name = "Foo" --[[, ...]] },
[2] = {backer_name = "Bar" --[[, ...]] },
},
}