Help find train

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
AdamK
Inserter
Inserter
Posts: 47
Joined: Thu Jul 25, 2019 9:11 am
Contact:

Help find train

Post 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?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Help find train

Post 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

Post Reply

Return to “Gameplay Help”