Difference between revisions of "DuplicateAllItems"
Jump to navigation
Jump to search
no edit summary
imported>Henning (→Notes) |
imported>Ez0n3 |
||
Line 1: | Line 1: | ||
{{Function | |||
|CSWikiPage = DuplicateAllItems | |||
|origin = GECK1 | |||
|summary = Duplicates all items into the target container. Any scripted item will be duplicated almost identically: | |||
Duplicates all items into the target container. Any scripted item will be duplicated almost identically: | |||
*Any script variables will be set to 0 on the duplicate | *Any script variables will be set to 0 on the duplicate | ||
*The duplicate will have a new FormID, meaning '''''if (Original == New)''''' will never be true | *The duplicate will have a new FormID, meaning '''''if (Original == New)''''' will never be true | ||
**More importantly, meaning if any script referenced the original the duplicate will not work. For instance '''''if (player.GetItemCount ArmorLeather)''''' will never be true if the player has the duplicate. | **More importantly, meaning if any script referenced the original the duplicate will not work. For instance '''''if (player.GetItemCount ArmorLeather)''''' will never be true if the player has the duplicate. | ||
|name = DuplicateAllItems | |||
|returnType = void | |||
|referenceType = [ActorRefID/ContainerRefID] | |||
|arguments = | |||
{{FunctionArgument | |||
|Name = TargetContainerRefID | |||
|Type = ref | |||
}} | |||
|example = DuplicateAllItems DanielLittlehornREF | |||
}} | |||
==Notes== | ==Notes== | ||
Line 13: | Line 21: | ||
*The default game does not make use of this function; likely because of the above bug | *The default game does not make use of this function; likely because of the above bug | ||
*As an alternative you can use the [[RemoveAllItems]] command | *As an alternative you can use the [[RemoveAllItems]] command | ||
[[Category:Functions]] | [[Category:Functions]] |