Difference between revisions of "DuplicateAllItems"

165 bytes added ,  10:30, 12 January 2011
no edit summary
imported>Henning
imported>Ez0n3
Line 1: Line 1:
'''Syntax:'''
{{Function
  [''ActorID''|''ContainerID''.]DuplicateAllItems ''TargetContainerID''
  |CSWikiPage = DuplicateAllItems
'''Example:'''
|origin = GECK1
  DuplicateAllItems DanielLittlehornREF
  |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]]
Anonymous user