I am creating some hidden entities that I need to delete once I mine the main one, but also need to store all the entities in a table, since I need to check the inventory levels.
Here is my code for creating and storing the entities in the table:
On Build
Now when I mine the Station, I'm deleting all stations that exist....
On Remove
So "TerraformingStation_i" is the Main Entity. When it gets removed, I need to destroy the corresponding "TerraformingStation_c" and "TerraformingStation_r" entities.
I was thinking of checking the positions of each. If they match delete them, but try as I may, or I delete ALL "TerraformingStation_i" entities are removed, or I'm not deleting the other "c" and "r" entities...
Thanks for any help.