ProtoFlux:Duplicate Slot: Difference between revisions

From Resonite Wiki
add duplicateslot
 
fix types, add gallery
 
(6 intermediate revisions by 3 users not shown)
Line 4: Line 4:
|Inputs=
|Inputs=
[
[
{"Name": "*", "Type": "Impulse"},
{"Name": "*", "Type": "Call"},
{"Name": "Instance", "Type": "Slot"}
{"Name": "Instance", "Type": "Slot"}
]
]
Line 14: Line 14:
|}}
|}}


Duplicates a [[Slot | slot]] and returns the duplicate.
Duplicates a [[Slot|slot]] and exposes the duplicated slot with the output called Duplicate which can be used for any nodes that accept the [[Slot|slot]] type.
 
For example, you can duplicate a slot from an instance and use [[ProtoFlux:Set Parent|Set Parent]] with the output of Duplicate to move the newly created slot's parent without changing anything with the original instance slot.
 
== Inputs ==
 
=== * ([[Impulses|Call]]) ===
 
Call this to write the value.
 
=== Instance ([[Slot|Slot]]) ===
 
The slot to make a duplicate of.
 
== Outputs ==
 
=== Next ([[Impulses|Continuation]]) ===
 
Will fire after Instance ([[Slot|Slot]]) has been duplicated due to * ([[Impulses|Call]]) being impulsed.
 
=== Duplicate ([[Slot|Slot]]) ===
 
The duplicate of Instance ([[Slot|Slot]]). Will only exist during the Next ([[Impulses|Continuation]]) Impulse context.
 
== Examples ==
 
<gallery widths=480px heights=480px>
File:Protoflux_example_duplicate_slot.webp|Example of how to use a duplicate slot with a template, to make a vending-machine esque item button.
</gallery>


[[Category:ProtoFlux:Slots]]
[[Category:ProtoFlux:Slots]]

Latest revision as of 19:50, 9 February 2024

Duplicate Slot
*
Next
Instance
Duplicate
Slots

Duplicates a slot and exposes the duplicated slot with the output called Duplicate which can be used for any nodes that accept the slot type.

For example, you can duplicate a slot from an instance and use Set Parent with the output of Duplicate to move the newly created slot's parent without changing anything with the original instance slot.

Inputs

* (Call)

Call this to write the value.

Instance (Slot)

The slot to make a duplicate of.

Outputs

Next (Continuation)

Will fire after Instance (Slot) has been duplicated due to * (Call) being impulsed.

Duplicate (Slot)

The duplicate of Instance (Slot). Will only exist during the Next (Continuation) Impulse context.

Examples