MarkForDelete

From the CreationKit Wiki
Jump to navigation Jump to search

Description[edit | edit source]

MarkForDelete allows a script to set the delete flag on a disabled reference, which places the reference in a queue for deletion a few frames later. It will not work on enabled references.

When an object is disabled, it remains in memory and continues to process scripts. This console command marks an object for actual deletion: when the system does its normal clean up, the object will be deleted, and its script will no longer be active.

References created during gameplay, such as those dropped by an actor or something created with the PlaceAtMe function, are truly deleted. They no longer exist in any way.

References that are in the ESM or an ESP file can be marked for deletion, but are not truly deleted. However, the script on such objects is removed and no longer runs.

Syntax[edit | edit source]

[ReferenceID.]MarkForDelete

Examples[edit | edit source]

PileOfBonesRef.Disable
PileOfBonesRef.MarkForDelete

Papyrus Version[edit | edit source]

Delete - ObjectReference