I have some question about how to enable/disable objects when an NPC died.
Here's the description of my mod :
I'm working on a mod that refilling Skyrim's population when unique NPCs dies. And not just that, I also "replaced" the dead NPCs' houses with the new NPCs' houses. For example; Faendal have a house in Riverwood, in vanilla when he dies his house will become empty and no one will live in it. But with my mod, when Faendal dies a new family will move in into Faendal's old house and redecorated the interior and make it looks completely different than before.
Though the term "replaced" isn't exactly the right word because I'm not altering the vanilla interiors, but instead I created new interior cells as the new home of the new NPCs and redirecting the new interior into vanilla exterior house when vanilla NPCs dies. And to do that I duplicated vanilla exterior doors, and those new doors will lead into new interior cells. These new doors will exactly be in the same place as vanilla doors, but leads into different interiors. By default these new doors will be disabled, but when the original owner of the house dies I will enable it and then disable the vanilla door, so now when you enter the house it no longer lead you into the old interior.
I already created many new interior cells for this mod. But, alas, I stucked, I don't know how to enable/disable objects when actors dies.
Thank you so much for reading. And thousands of thanks for you if you could help me.