Jokerine Posted January 25, 2015 Share Posted January 25, 2015 Good afternoon everybody! I had a little question - does anybody know if MarkForDelete works on both xmarkers and their children? I've got a bunch of objects connected to one and I want to disable and delete them once the quest is done, but I've been researching and found nothing about this. Would MarkForDelete remove the parent xmarker and the children as well, or not? Thank you! :dance: Link to comment Share on other sites More sharing options...
Fallout2AM Posted January 25, 2015 Share Posted January 25, 2015 I dont' think it would be useful in your case to mark for delete them, because you probably flagged them all as persistent references Link to comment Share on other sites More sharing options...
jazzisparis Posted January 25, 2015 Share Posted January 25, 2015 Would MarkForDelete remove the parent xmarker and the children as well, or not?I would be very surprised if it does. You will most likely need to delete each child reference, individually. Link to comment Share on other sites More sharing options...
Jokerine Posted January 25, 2015 Author Share Posted January 25, 2015 Well, I'll be. Darn. Thanks for the responses :) Link to comment Share on other sites More sharing options...
Belthan Posted January 28, 2015 Share Posted January 28, 2015 Just did a quick test, and MarkForDelete does delete children if their parent is disabled when you call it. It does not delete children if the parent is enabled when you call it. So, this will disable and delete MyREF and all its children: MyREF.Disable MyREF.MarkForDelete Link to comment Share on other sites More sharing options...
Jokerine Posted January 28, 2015 Author Share Posted January 28, 2015 Oh my goodness, that's great news indeed! I had my scripts set precisely like that (first disable, then markfordelete), and I'm so pleased that it works. Thank you so much for testing! You're a life saver :dance: Link to comment Share on other sites More sharing options...
Fallout2AM Posted January 28, 2015 Share Posted January 28, 2015 I just tried to set MyREF as Enable Parent of the child, I marked for delete, save and reload and the child was still thereDid I misunderstand the kind of relationship you want to give them? Link to comment Share on other sites More sharing options...
Belthan Posted January 29, 2015 Share Posted January 29, 2015 Correct, MyChildREF had its Enable Parent set to MyREF. What I saw was that it depended on the enable state of MyREF. If I called MyREF.MarkForDelete while MyREF was enabled, MyREF was deleted but MyChildREF was not. If I disabled MyREF first, calling MyREF.MarkForDelete deleted both MyREF and MyChildREF. Link to comment Share on other sites More sharing options...
Fallout2AM Posted January 29, 2015 Share Posted January 29, 2015 out of curiosity, did you try to PRID the child on console? because I had the opposite behaviour, both the father (<<< obvious) and the children (<<< not so obvious) didn't erase after mark for delete.One day I'll make some deeper more tries, it could be a useful thing to use Link to comment Share on other sites More sharing options...
Belthan Posted January 30, 2015 Share Posted January 30, 2015 Yep, that's how I confirmed it was deleted. Used prid from the console with MyChildREF's ID before calling MyREF.MarkForDelete, and it was there. Used it again afterwards and got the "Item not found for object ref id" message. If you're seeing different behavior, then there's something else happening that I don't understand yet. I'll do a little more digging. Link to comment Share on other sites More sharing options...
Recommended Posts