1. Connect 2 constant combinators like in the image below
2. Place a blueprint of them in the first slot of your quicker
3. Execute the follow code in the console. It's gonna place the entity of the blueprint using the create_entity methode
Code: Select all
/c local es = game.player.character.get_inventory(defines.inventory.player_quickbar)[1].get_blueprint_entities() for k,v in pairs (es) do local g={} for k,v in pairs(v) do g[k]=v end g.inner_name=v.name g.inner_name=v.name g.position.x=g.position.x+game.player.position.x g.position.y=g.position.y+game.player.position.y g.force=game.player.force game.surfaces.nauvis.create_entity(g) end
Expected results: The 2 constant combinators connected by a red wire shut be placed at the players position
Actual results: The 2 constant combinators get placed without red wire connecting them