m grammar |
fix types, add gallery |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
|Inputs= | |Inputs= | ||
[ | [ | ||
{"Name": "*", "Type": " | {"Name": "*", "Type": "Call"}, | ||
{"Name": "Instance", "Type": "Slot"} | {"Name": "Instance", "Type": "Slot"} | ||
] | ] | ||
Line 20: | Line 20: | ||
== Inputs == | == Inputs == | ||
=== * (Call) === | === * ([[Impulses|Call]]) === | ||
Call this to write the value. | Call this to write the value. | ||
Line 30: | Line 30: | ||
== Outputs == | == Outputs == | ||
=== Next (Continuation) === | === Next ([[Impulses|Continuation]]) === | ||
Will fire after Instance ([[Slot|Slot]]) has been duplicated due to * (Call) being impulsed. | Will fire after Instance ([[Slot|Slot]]) has been duplicated due to * ([[Impulses|Call]]) being impulsed. | ||
=== Duplicate ([[Slot|Slot]]) === | === Duplicate ([[Slot|Slot]]) === | ||
The duplicate of Instance ([[Slot|Slot]]). Will only exist during the Next (Continuation) Impulse context. | The duplicate of Instance ([[Slot|Slot]]). Will only exist during the Next ([[Impulses|Continuation]]) Impulse context. | ||
== Examples == | == 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
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
-
Example of how to use a duplicate slot with a template, to make a vending-machine esque item button.Example of how to use a duplicate slot with a template, to make a vending-machine esque item button.