Difference between revisions of "RemoveItemTarget"
Jump to navigation
Jump to search
no edit summary
imported>Jazzisparis |
imported>Jazzisparis |
||
Line 14: | Line 14: | ||
|Name = quantity | |Name = quantity | ||
|Type = int | |Type = int | ||
|Optional = y | |||
}}{{FunctionArgument | |||
|Name = clearOwnership | |||
|Type = 0/1 | |||
|Optional = y | |Optional = y | ||
}} | }} | ||
|example = <pre>SourceRef.RemoveItemTarget Camera TargetRef</pre> | |example = <pre>SourceRef.RemoveItemTarget Camera TargetRef</pre> | ||
This will move <i>all</i> Camera items from <i>SourceRef</i> to <i>TargetRef</i>. | This will move <i>all</i> Camera items from <i>SourceRef</i> to <i>TargetRef</i>. | ||
<pre>SourceRef.RemoveItemTarget NVHoldoutWeapons TargetRef 4</pre> | <pre>SourceRef.RemoveItemTarget NVHoldoutWeapons TargetRef 4 1</pre> | ||
This will move 4 of each item in the list <i>NVHoldoutWeapons</i> from <i>SourceRef</i> to <i>TargetRef</i>. | This will move 4 of each item in the list <i>NVHoldoutWeapons</i> from <i>SourceRef</i> to <i>TargetRef</i>. Ownership will be cleared off all moved items. | ||
}} | }} | ||
==Notes== | ==Notes== | ||
* | *All stats/attributes (health, script, mods, ownership, etc.) of removed items are preserved. | ||
*If <i>quantity</i> is not specified or is <= 0, <u>all</u> instances of the item are removed. | *If <i>quantity</i> is not specified or is <= 0, <u>all</u> instances of the item are removed. | ||
*The function accepts a FormList as parameter (in place of an item) and also supports sub-lists. | *The function accepts a FormList as parameter (in place of an item) and also supports sub-lists. |