Difference between revisions of "Duplicate Slot (LogiX node)"
(Adds dynvar caveat.) |
(Marked this version for translation) |
||
Line 14: | Line 14: | ||
The '''Duplicate Slot''' node creates a copy of the <code>Template</code> input slot when an impulse is received at <code>DoDuplicate</code>. | The '''Duplicate Slot''' node creates a copy of the <code>Template</code> input slot when an impulse is received at <code>DoDuplicate</code>. | ||
+ | <!--T:6--> | ||
As usual, precautions related to the duplication and reparenting of dynamic variables apply, as described on the [[Dynamic Variables]] page. | As usual, precautions related to the duplication and reparenting of dynamic variables apply, as described on the [[Dynamic Variables]] page. | ||
Line 20: | Line 21: | ||
+ | <!--T:7--> | ||
The <code>Duplicate</code> output provides the newly created slot. This data is only available for the duration of the impulse chain started from <code>OnDuplicated</code>. | The <code>Duplicate</code> output provides the newly created slot. This data is only available for the duration of the impulse chain started from <code>OnDuplicated</code>. | ||
+ | <!--T:8--> | ||
The <code>Duplicate</code> slot shares the same parent slot as the <code>Template</code>. | The <code>Duplicate</code> slot shares the same parent slot as the <code>Template</code>. | ||
Revision as of 13:47, 16 February 2022
Duplicate Slot | ||
---|---|---|
Inputs | ||
Impulse | DoDuplicate | |
Slot | Template | |
Outputs | ||
Impulse | OnDuplicated | |
Slot | Duplicate |
The Duplicate Slot node creates a copy of the Template
input slot when an impulse is received at DoDuplicate
.
As usual, precautions related to the duplication and reparenting of dynamic variables apply, as described on the Dynamic Variables page.
Usage
The OnDuplicated
output fires an impulse when the Template
slot has been successfully duplicated. No impulse is fired if there is no valid Template
.
The Duplicate
output provides the newly created slot. This data is only available for the duration of the impulse chain started from OnDuplicated
.
The Duplicate
slot shares the same parent slot as the Template
.
Examples
This node is commonly used when one wants to spawn an item when an event occurs. Place a template object under an inactive parent slot and duplicate the template. Often one needs to reparent the duplicate immediately using a Set Parent (LogiX node). If the Template slot is itself set as active, but it is inactive due to a parent slot being inactive, the duplicate will be active after reparenting under another active slot.