Jump to content

A question about MarkForDelete


Jokerine

Recommended Posts

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

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

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...