place entity ghost like in blueprint

Place to get help with not working mods / modding interface.
Post Reply
ichVII
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Mon Feb 27, 2017 10:16 pm
Contact:

place entity ghost like in blueprint

Post by ichVII »

Currently, if you place a entity ghost using create_entity, it does not try to merge with an equal entity at the same spot. In particular, if we place a ghost of an assembler over an assembler, that doesnt reset that assembler to no recipe, but it creates a ghost entity beneath it. If, however we deploy a blueprint of the assembler over it, the recipe adjusts to the one in the blueprint.

Is there an easy chain of commands that can create an entity ghost, but has the same result as placing a blueprint with the same properties?

You could for example place that entity ghost at a free space, take a blueprint of that and then deploy it at the actual position and delete the ghost and the blueprint you created.
That would have the desired result, but the "find a free space" step seems potentially annoying and unreliable, as the next free space might be far away. I have considered using a different surface, but im not sure if that is a good solution.

Edit: The get_blueprint_entities and set_blueprint_entities functions can do everything i need to do.

Post Reply

Return to “Modding help”

Who is online

Users browsing this forum: makeitgraphic18