Page 1 of 1

Help find train

Posted: Tue Feb 23, 2021 4:14 pm
by AdamK
In my base I got a lot of trains. All of them of the same length. Except for one that is incorrect by mistake. How can I find it?

Re: Help find train

Posted: Tue Feb 23, 2021 4:48 pm
by DaveMcW
Use this console command:

Code: Select all

/c length = 6
for _, train in pairs(game.player.force.get_trains()) do
  if #train.carriages ~= length then
    game.player.print("[gps=".. train.carriages[1].position.x ..",".. train.carriages[1].position.y .."]")
  end
end