Talk:MoveToMyEditorLocation - ObjectReference

From the CreationKit Wiki
Jump to navigation Jump to search

Concerning Game Save Bloat[edit source]

I'm not sure if this belongs here. I intend to start a thread regarding this on the Bethsoft forums.

I wonder if using this function would free the object in question from the game save, so long as there were no other attributes of the item that were different from it's original state. The reason I'd suspect this is that if this goes back into it's original position (and state) then there would be no need for it to take up space in the game save. I certainly hope this is true.

I apologize if this doesn't fit the style guide for a talk page.

--Trilioth (talk) 2015-01-13T04:12:49 (EST)

The move functions IIRC don't hold onto references, or free them so to speak. Their job is to do what they are designed to do, to the reference that they are called on. It's the variables pointing at the references that can be problematic. Once a move is completed, and you're sure the reference is no longer needed, you can disable it, then delete it, and change the variable to none. This is not always guaranteed to keep the reference from being persistent, however. --Terra Nova2 (talk) 2015-01-13T09:04:46 (EST)

Has anyone actually got this function to work?[edit source]

In my testing it did nothing at all, ended up placing a few xmarkers and moving to them.

Seems to work fine for me. This was my code:
Event OnLoad()
 Self.MoveToMyEditorLocation()
EndEvent
What kinds of forms were you trying to move? I don't think STATIC forms can be moved. I tested this on MiscItem, Weapon, and Armor forms. --Antares (talk) 2016-08-09T10:41:12 (EDT)