Difference between revisions of "MarkForDelete"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Kkuhlmann
 
imported>MadCat221
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=='''Description'''==
{{Function
 
|origin = GECK1
'''MarkForDelete''' allows a script to set the delete flag on a disabled reference. The reference is placed in a queue for deletion a few frames later. It will not work on enabled references.
|summary = '''MarkForDelete''' allows a script to set the delete flag on a disabled reference. The reference is placed in a queue for deletion a few frames later. It will not work on enabled references.


Whenever an object is disabled, it remains in memory. With items that can be dropped from inventory but work on their own, every drop and every pickup is a disable. Players could wrack up several hundred useless disabled objects in memory by the end of the game, each running a script (yes, disabled objects still run their scripts). This new function will mark an object for future deletion. When the system does it's normal clean up, the object will be truly deleted, and it's script will no longer be active.
Whenever an object is disabled, it remains in memory. With items that can be dropped from inventory but work on their own, every drop and every pickup is a disable. Players could wrack up several hundred useless disabled objects in memory by the end of the game, each running a script (yes, disabled objects still run their scripts). This new function will mark an object for future deletion. When the system does it's normal clean up, the object will be truly deleted, and it's script will no longer be active.
Line 7: Line 7:
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 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.  
The shorthand version of this function is simply "Zap".


=='''Syntax'''==
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.
 
|name = MarkForDelete
  [''ReferenceID''.]MarkForDelete
|returnType = void
|referenceType = [ObjectRefID]
|example = PileOfBonesRef.Disable
  PileOfBonesRef.MarkForDelete


=='''Examples'''==
}}
PileOfBonesRef.Disable
PileOfBonesRef.MarkForDelete


=='''Notes'''==
==Notes==
*Features:  
*Features:  
**Reference must be disabled first
**Reference must be disabled first
Line 23: Line 24:
**Should only be called on a reference that you want to get rid of (don't use this function if you plan on enabling it later)
**Should only be called on a reference that you want to get rid of (don't use this function if you plan on enabling it later)
**References that are marked for deletion cannot be enabled later.
**References that are marked for deletion cannot be enabled later.
<!--
=='''See Also'''==
=='''Reference'''==
None provided.
<!-- [[MarkForDelete_Reference|List of functions that use MarkForDelete]]  (wiki) -->


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.1)]]
[[Category:Designer Debug Tools]]
[[Category:Designer Debug Tools]]
[[Category:Godsend Functions]]
[[Category:Godsend Functions (GECK 1.1)]]

Latest revision as of 00:08, 2 July 2011

< [[::Category:Functions|Category:Functions]]

A function included in the GECK version 1.1.0.36.

Description

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

Whenever an object is disabled, it remains in memory. With items that can be dropped from inventory but work on their own, every drop and every pickup is a disable. Players could wrack up several hundred useless disabled objects in memory by the end of the game, each running a script (yes, disabled objects still run their scripts). This new function will mark an object for future deletion. When the system does it's normal clean up, the object will be truly deleted, and it's 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.

The shorthand version of this function is simply "Zap".

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

[help]
[ObjectRefID].MarkForDelete

Example

PileOfBonesRef.Disable
PileOfBonesRef.MarkForDelete

Notes

  • Features:
    • Reference must be disabled first
    • Works on actors
    • Should only be called on a reference that you want to get rid of (don't use this function if you plan on enabling it later)
    • References that are marked for deletion cannot be enabled later.