ProtoFlux:Write Dynamic Variable

From Resonite Wiki
Revision as of 19:09, 19 May 2024 by AmasterAmaster (talk | contribs) (The visual was incorrect, so that got fixed. Updated the output descriptions. Updated input descriptions. Added a warning letting people know that the top most is a fail condition output, which may break the code your working on if you dont pay attention for it.)
Write Dynamic Variable
*
OnNotFound
Target
OnSuccess
Path
OnFailed
Value
Dynamic

Write Dynamic Variable is a ProtoFlux node that is able to write to previously created dynamic variables under a slot. For more info on Dynamic Variables, see Dynamic Variables. This node will only write to the variable if the path and type it's writing to is the same as a variable that exists. See Dynamic Variables on how equality is determined on paths, since 2 paths with different content can still make many different variables equal.

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

Inputs

* (Call)

Call this to write the variable.

Target (Slot)

The slot hierarchy to search for a dynamic variable to write to.

Path (String)

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

Value (Generic)

Any type of value, reference, or object that should be written to an existing variable.

Outputs

OnNotFound (Continuation)

Fires when the path is incorrect or there is nothing to find in the given slot hierarchy.

OnSuccess (Continuation)

Fires when * is fired and a variable already exists that can be written to through Target.

OnFailed (Continuation)

Fires when * is fired and the variable was found but cannot be written to. The variable was not created when this impulses.