What makes an entity invalid ?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

What makes an entity invalid ?

Post by binbinhfr »

Hi,

I have a problem with one user of my mod. Only this user seems to have this problem and I cannot figure out what happens. Infact, the user sent me a "faulty" save, and what I figure out is the following :
I use a global list of drones entities to manage them (I used them to switch the player.character and move around in a drone). Usually it works nice, but in his case, it seems that sometimes one of these recorded entities (in the global list) is becoming invalid, even if the entity is still "alive" and on the ma and working.
So I wonder what can make an entity invalid but still alive ? It seems that the global reference to this entity changed, but the entity is still here and usable... But my mod lost its reference...
I must say that I play a lot with this mod and never met this problem myself. And it seems that other people are using it without problem.

For me, the only way to make a entity invalid was if it was destroyed (by another entity or by another mod using destroy() ).

thread :
viewtopic.php?f=93&t=25026&p=167176#p167176
My mods on the Factorio Mod Portal :geek:

Post Reply

Return to “Modding help”