Mark For Delete?

Post » Thu May 03, 2012 8:35 pm

Help Please

When you MarkForDelete an Enable Parent, does it also MarkForDelete the children of that parent?
I was also wondering when exactly do objects that are Marked For Delete get deleted? And when you use PlaceAtMe for placeing explosions, fire, ect. can that cause bloated save game files the same as using PlaceAtMe to place objects?

Any help would be greatly appreciated.
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Thu May 03, 2012 10:25 am

If you use markfordelete on an object you created in the .esp the function will do nothing. It works only on references created during gameplay.

It doesn't work on a mine you placed in the geck and want to disable once exploded.
But it works on a mine the player dropped in game and you want to remove once exploded.

then use markfordelete on the dropped mine itself, not on the explosion because the FX is not a persistent reference and can't be called in the parent's script.
User avatar
Enny Labinjo
 
Posts: 3480
Joined: Tue Aug 01, 2006 3:04 pm

Post » Fri May 04, 2012 12:36 am

Thanks, that makes sence. Appreciate the help.
User avatar
Ludivine Dupuy
 
Posts: 3418
Joined: Tue Mar 27, 2007 6:51 pm

Post » Thu May 03, 2012 6:15 pm

First off thank you again for answering. Your answer made me go back and do further testing. It seems you can use MarkForDelete on an object you created in the .esp. It does not only work on references created during gameplay.

For example I wrote this script, put it in multiple Gnomes that are Activators, and Initially Disabled them.

Begin GameMode

if Player.GetHealthPercentage < 0.50
Enable
endif

if GetDisabled == 0
if Player.GetHealthPercentage > 0.50
Disable
endif
endif

End

Begin OnHitWith

Disable
MarkForDelete
Player.ResetHealth

End

What the above script does is;

When the Players Health is below 50% all of the Gnomes Enable. When you shoot one of the Gnomes all of the Gnomes Disable because the one you shoot Resets the Players Health back to 100%. As you see, it is also Marked for Delete. Now when the players health is again below 50% all but the Gnome that was shot and Marked for Delete Enable again.

-------------------------------------------------------------------

So back to the first part of my original question. What Im trying to do is I have 4 Enemies that are Enabled at the same time by an XMarker EnableParent. I want to Disable them and Mark them for Delete when they are dead, but the only way they can be Disabled is by Disabling there EnableParent. In order to Mark them for Delete it seems that I would have to Mark for Delete the EnableParent. What I need to know is if I Mark the EnableParent for Delete will it also Mark for Delete the Enemies (children)?
User avatar
leni
 
Posts: 3461
Joined: Tue Jul 17, 2007 3:58 pm

Post » Thu May 03, 2012 1:34 pm

You mean you can disable individually a children object with the parent still enabled ?

However, the object created in geck is not really removed. The difference is the script still runs on disabled objects bu not if they are marked for deletion.

OK. I just found the page. Here it is : http://geck.gamesas.com/index.php/MarkForDelete
User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm


Return to Fallout 3

cron