ProtoFlux:Write: Difference between revisions

From Resonite Wiki
Created page with "{{#Invoke:ProtoFlux|GenerateUI |Name=Write |Category=Actions |Inputs= [ {"Name":"*", "Type":"Impulse"}, {"Name":"Value", "Type":"Dummy"} ] |Outputs= [ {"Name":"OnWritten", "Type":"Continuation"}, {"Name":"OnFail", "Type":"Continuation"} ] |Globals= [ {"Name":"Variable", "Type":"Variable"} ] |}} {{Template:Basic Writes Info|Writes}} TODO: Come back to do this one's standard stuff"
 
Finish the page for now
Line 17: Line 17:
]
]
|}}
|}}
Writes take Variable ([[Type:Variable|Variable]]) as an input, and the type that Variable wraps will determine what Value (Generic) will take as a value. The node will then write Value (Generic) to the field Variable ([[Type:Variable|Variable]]) wraps.
When it comes to the global Variable ([[Type:Variable|Variable]]), pulling a protoflux wire from a [[ProtoFlux:Source|Source Node]] or a [[ProtoFlux:Reference Source|Reference Source Node]] and dropping it onto the global field will mark the value that the source points to as the value that should be modified by this node upon impulse.


{{Template:Basic Writes Info|Writes}}
{{Template:Basic Writes Info|Writes}}


== Inputs ==
=== * (Call) ===
Call this to write the value.
=== Value (Generic) ===
[[:Category:Type|Value]] to write to the value pointed to by Variable ([[Type:Variable|Variable]])
== Outputs ==
=== OnWritten (Continuation) ===
sends an impulse after * (Call) has been impulsed and the value has been written.
=== OnFail (Continuation) ===
sends an impulse after * (Call) has been impulsed and the value wasn't able to be written due to a missing target or a missing Variable ([[Type:Variable|Variable]]) value
== Globals ==
=== Variable ([[Type:Variable|Variable]] Generic)===
The [[Type:Variable|Variable]] to write to.
== Examples ==


TODO: Come back to do this one's standard stuff
{{Stub}}

Revision as of 18:52, 3 February 2024

Write
*
OnWritten
Value
OnFail
Variable
null
Actions

Writes take Variable (Variable) as an input, and the type that Variable wraps will determine what Value (Generic) will take as a value. The node will then write Value (Generic) to the field Variable (Variable) wraps.

When it comes to the global Variable (Variable), pulling a protoflux wire from a Source Node or a Reference Source Node and dropping it onto the global field will mark the value that the source points to as the value that should be modified by this node upon impulse.

Writes are a way to change a specified value without driving it. Instead you can use Writes to change a value in a similar fashion to changing the value through the inspector. Using Writes helps with performance too, since the values provided to the node only evaluate for one game tick while the node is being impulsed vs a driver which evaluates every game tick. This can also be used to reduce the amount of times code is evaluated. If you have to search the entire root for your code to find a slot and then do an operation, using Writes with your operations will help with performance since you're only searching once and not every single game tick.

Inputs

* (Call)

Call this to write the value.

Value (Generic)

Value to write to the value pointed to by Variable (Variable)

Outputs

OnWritten (Continuation)

sends an impulse after * (Call) has been impulsed and the value has been written.

OnFail (Continuation)

sends an impulse after * (Call) has been impulsed and the value wasn't able to be written due to a missing target or a missing Variable (Variable) value

Globals

Variable (Variable Generic)

The Variable to write to.

Examples

This article or section is a Stub. You can help the Resonite Wiki by expanding it.