ProtoFlux:Create Dynamic Variable: Difference between revisions

From Resonite Wiki
Created page with "{{#Invoke:ProtoFlux|GenerateUI |Name=Create Dynamic Variable |Category=Variables |Inputs= [ {"Name":"*", "Type":"Call"}, {"Name":"Target", "Type":"Slot"}, {"Name":"Path", "Type":"String"}, {"Name":"CreateDirectlyOnTarget", "Type":"bool"}, {"Name":"CreateNonPersistent", "Type":"bool"}, {"Name":"InitialValue", "Type":"Dummy"} ] |Outputs= [ {"Name":"OnNotFound", "Type":"Continuation"}, {"Name":"OnCreated", "Type":"Continuation"}, {"Name":"OnAlredyExists", "Type":"Continuati..."
 
your -> you're
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:


Create Dynamic Variable is a ProtoFlux node that is able to create dynamic variables under a slot. For more info on Dynamic Variables, see [[Dynamic Variables]]. This node will only attach the variable if <code>Path</code> were to be used on the slot it's attaching to would be able to bind. Otherwise the dynamic variable will not be created and it will impulse <code>OnNotFound</code>.
Create Dynamic Variable is a ProtoFlux node that is able to create dynamic variables under a slot. For more info on Dynamic Variables, see [[Dynamic Variables]]. This node will only attach the variable if <code>Path</code> were to be used on the slot it's attaching to would be able to bind. Otherwise the dynamic variable will not be created and it will impulse <code>OnNotFound</code>.
{{Note|Keep in mind that the top most output is '''OnNotFound'''. This can be confusing (especially if you're not paying attention when connecting nodes) when the code fires and nothing happens.|warning}}


== Inputs ==
== Inputs ==

Latest revision as of 20:40, 19 May 2024

Create Dynamic Variable
*
OnNotFound
Target
OnCreated
Path
OnAlredyExists
CreateDirectlyOnTarget
OnFailed
CreateNonPersistent
InitialValue
Variables

Create Dynamic Variable is a ProtoFlux node that is able to create dynamic variables under a slot. For more info on Dynamic Variables, see Dynamic Variables. This node will only attach the variable if Path were to be used on the slot it's attaching to would be able to bind. Otherwise the dynamic variable will not be created and it will impulse OnNotFound.

Keep in mind that the top most output is OnNotFound. This can be confusing (especially if you're not paying attention when connecting nodes) when the code fires and nothing happens.

Inputs

Target (Slot)

The slot to search for a dynamic variable space from to put the variable into

Path (String)

The path for the created dynamic variable. To see how this influences attaching see the paragraph at the beginning of this page.

CreateDirectlyOnTarget (bool)

Whether to attach the new dynamic variable when created to the slot the dynamic variable space component is on (false) or directly on the slot specified on Target (true)

CreateNonPersistent (Bool)

If true, this will create the dynamic variable component with disabled Persistent>.

InitialValue (Generic)

Any type of value, reference, or object that the variable should store.

See also: #1254

Outputs

OnNotFound (Continuation)

Fires when * is fired and the variable would not able to bind when created at Target. The variable was not created when this impulses.

OnCreated (Continuation)

Fires when * is fired and a variable has been created and the variable didn't exist before. This will only create the variable if it can bind, which is explained on the Dynamic Variables page.

OnAlredyExists (Continuation)

Fires when * is fired and a variable already exists with same Path.

OnFailed (Continuation)

Fires when * is fired and InitialValue it's local element.