Code: Select all
game.surfaces.nauvis.create_entity{name="straight-rail",position={1,1},force="player"}
game.surfaces.nauvis.create_entity{name="straight-rail",position={1,3},force="player"}
game.surfaces.nauvis.create_entity{name="straight-rail",position={1,5},force="player"}
game.surfaces.nauvis.create_entity{name="straight-rail",position={1,7},force="player"}
game.surfaces.nauvis.create_entity{name="locomotive",position={1,4},orientation=0,force="player"}
Code: Select all
game.surfaces.nauvis.find_entity("locomotive",{1,4}).orientation = 0.5