Reviving ghosts that overlap seems to have odd behavior

Place to get help with not working mods / modding interface.
NiftyManiac
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jan 21, 2017 12:01 am
Contact:

Reviving ghosts that overlap seems to have odd behavior

Post by NiftyManiac »

So, here's the situation. I have a blueprint with a normal entity and a special entity, located at the exact same position. The special entity is defined with

Code: Select all

collision_mask = {"not-colliding-with-itself"},
collision_box = {{0, 0}, {0, 0}},
If I place the blueprint on an empty area, ghosts of both entities get placed. If I call special_entity_ghost.revive(), the special entity revives and the ghost of the normal one remains. Great.

If I place the blueprint over trees with shift-click, the trees intersecting the normal entity are marked for deconstruction, and both ghost entities are placed. If I call special_entity_ghost.revive(), the special entity revives, but the ghost of the normal one is destroyed. What's going on?
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Reviving ghosts that overlap seems to have odd behavior

Post by aubergine18 »

From vague memory you have to put them either on different layers (render_layer or something like that?) or at least make sure they are not on a ground layer. Been a while since I played with that but hopefully it will help you find solution.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Post Reply

Return to “Modding help”