DocsNodesValues

State

Remembers a value from one frame to the next.

memory, accumulate, remember, carry over, running total, simulation, feedback
Category
Values
Outputs
value
Runs live in
no target yet

Everything else in a graph is recomputed from scratch each frame. This is the exception: wire its output back into Next and the value accumulates instead of resetting.

That is what makes movement and simulation possible. A direction plus State becomes a position. A score plus State becomes a running total. Without it, nothing in a graph can remember anything.

Inputs

SocketTypeWiring
initvalue, optional

Parameters

NameTypeDefaultAvailable whenWhat it does
Initialnumber0always
nextnumber0always

Built with this node

See also

  • inputThe usual source: a direction from the player, integrated into a position.
  • timeWhen the value should follow the clock rather than accumulate.

Open the editor and try it