ProtoFlux:Create Dynamic Variable

From Resonite Wiki
Revision as of 20:40, 19 May 2024 by AmasterAmaster (talk | contribs) (your -> you're)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.