[solved] Detect Ghosts before building

Place to get help with not working mods / modding interface.
User avatar
yaim904
Fast Inserter
Fast Inserter
Posts: 147
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

[solved] Detect Ghosts before building

Post by yaim904 »

Hello, how are you?
How is the new year going?

I just thought of something, but for that, I need to know if the entity is being built because there was previously a ghost or if it is being built without the ghost.
Last edited by yaim904 on Sat Jan 10, 2026 11:45 am, edited 1 time in total.
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by Deepl.
:D
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 225
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: Detect Ghosts before building.

Post by Osmo »

You will get a ghost mined event before entity built event i think. Also, robots and platforms always build because of a ghost.
Natha
Filter Inserter
Filter Inserter
Posts: 303
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: Detect Ghosts before building.

Post by Natha »

If the ghost has tags set, you will find them in the event data
User avatar
yaim904
Fast Inserter
Fast Inserter
Posts: 147
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

Re: Detect Ghosts before building.

Post by yaim904 »

Osmo wrote: Fri Jan 09, 2026 3:17 pm
It's a good idea, and if the creation of the ghost is recorded but not when it is built.

What I have in mind is the following:
When a Loader is built without a ghost, verify a code (I already have that code).
When a Loader is built with a ghost, ignore the code.

What I'm trying to do is find a way to know if the Loader has a ghost or not.

I will think about it.
Natha wrote: Fri Jan 09, 2026 7:24 pm
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by Deepl.
:D
User avatar
yaim904
Fast Inserter
Fast Inserter
Posts: 147
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

Re: Detect Ghosts before building.

Post by yaim904 »

Natha wrote: Fri Jan 09, 2026 7:24 pm
I did some tests, and it works.
Thank you very much.
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by Deepl.
:D
Post Reply

Return to “Modding help”