It seems that CopyObject doesn’t work for me when used on placeable. At first I thought that there is some exception for npc lootable corpses, but neither it is working with chest placeable.
OBJECT_SELF is placeable, script is called from OnUse event, the debug messages shows the location is/should be valid, yet oCopy is OBJECT_INVALID.
Despite the function header specifies only creature and item, Lexicon says it works with placeables as well. I cannot remember whether I copied any placeable before, but surely I had to, yet it doesn’t work now. What I am missing here?
It used to only work for items and creatures, but EE added the ability to copy most other object types. I cannot recall which patch added it, offhand.
Probably patch 8193
Here’s the current toolset description for CopyObject:
// Duplicates the object specified by oSource.
// NOTE: this command can be used for copying Creatures, Items, Placeables, Waypoints, Stores, Doors, Triggers.
// If an owner is specified and the object is an item, it will be put into their inventory
// Otherwise, it will be created at the location.
// If a new tag is specified, it will be assigned to the new object.
object CopyObject(object oSource, location locLocation, object oOwner = OBJECT_INVALID, string sNewTag = “”)
Thanks, I got confused because the lexicon page did not have information about the behavior is different in EE (I am running under EE but old patch that doesn’t have this feature yet).