ProtoFlux:Write To Global

From Resonite Wiki
Write Global
*
OnWritten
Value
OnFail
Global
null
Core

The Write To Global node takes in a value or reference and a Global Value component. When called, this node will write to the global value, which then can be used by any Global To Output node that has that component reference.

Inputs

* (Call)

Calls an impulse to write to a global value component.

Value (Generic)

The value to write into the global value component.

Outputs

OnWritten (Continuation)

Fires when the value was successfully written.

OnFail (Continuation)

Fires when this node fails to write.

Globals

Global (Generic)

The global value component that is referenced.

Examples

To make this work, you need the following things:

Using primary on either global areas of the nodes will automatically make a GlobalValue/GlobalReference component. These can be accessed currently through the inspector only. Once opened in the inspector, if there are any GlobalToOutput nodes that automatically made GlobalValue/GlobalReference components on them, those can be removed in favor of any components made prior (either on WriteToGlobal nodes or on other slots that has those components)

The last step is to reference GlobalValue/GlobalReference component in the WriteToGlobal node (or from some other slot) to the field in the GlobalToOutput node. Then call the write node and notice the value change.

Keep in mind that the GlobalToOutput node will not update automatically if you have a display out from it already, using the Continuously Changing Relay will update these displays as you write values to see those displays update, although not recommended.