Difference between revisions of "DeleteReference"
Jump to navigation
Jump to search
imported>JdeRau (Creation of page) |
imported>Julianig (Note added : Disable and DeleteReference in the same frame won't work) |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
'''Syntax:''' | '''Syntax:''' | ||
''[reference:ref.]''DeleteReference | ''[reference:ref.]''DeleteReference | ||
'''Example:''' | |||
Ref Object | |||
Set Object to Player.PlaceAtMe Gold001 | |||
Object.DeleteReference | |||
Attempts to delete the calling object from the game and returns true if successful. | Attempts to delete the calling object from the game and returns true if successful. | ||
In order for a reference to be deleted, it must: | In order for a reference to be deleted, it must: | ||
Line 11: | Line 17: | ||
*not be contained in an inventory | *not be contained in an inventory | ||
*be dynamic | *be dynamic | ||
== Notes == | == Notes == | ||
*Dynamic references are those that are generated via PlaceAtMe or dropped from an inventory and they have a mod index of 0xFF. | *Dynamic references are those that are generated via PlaceAtMe or dropped from an inventory and they have a mod index of 0xFF. | ||
*The primary aim of this function is to combat the savegame bloat resulting from generation of large numbers of dynamic references. In most cases, it is better to avoid creating such bloat in the first place. | *The primary aim of this function is to combat the savegame bloat resulting from generation of large numbers of dynamic references. In most cases, it is better to avoid creating such bloat in the first place. | ||
*DeleteReference will not delete the calling object if it was disabled in the same frame. | |||
*IsRefDeleted is not related to this command in any way. | *IsRefDeleted is not related to this command in any way. | ||
== See Also == | == See Also == |
Latest revision as of 08:28, 12 December 2011
A command for Oblivion Script Extender
Syntax:
[reference:ref.]DeleteReference
Example:
Ref Object Set Object to Player.PlaceAtMe Gold001 Object.DeleteReference
Attempts to delete the calling object from the game and returns true if successful.
In order for a reference to be deleted, it must:
- be disabled
- not be an actor
- not be contained in an inventory
- be dynamic
Notes[edit | edit source]
- Dynamic references are those that are generated via PlaceAtMe or dropped from an inventory and they have a mod index of 0xFF.
- The primary aim of this function is to combat the savegame bloat resulting from generation of large numbers of dynamic references. In most cases, it is better to avoid creating such bloat in the first place.
- DeleteReference will not delete the calling object if it was disabled in the same frame.
- IsRefDeleted is not related to this command in any way.