forgot examples and category |
m added image example that is broken, fix types |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|Inputs= | |Inputs= | ||
[ | [ | ||
{"Name": "*", "Type": " | {"Name": "*", "Type": "Call"} | ||
] | ] | ||
|Outputs= | |Outputs= | ||
Line 12: | Line 12: | ||
|}} | |}} | ||
This node will restrict the amount of impulses that go through Next (Continuation) to one impulse per game tick. This is useful if you have multiple code branches that may or may not execute at the same time, but you want to run code after all of those branches only once. | This node will restrict the amount of impulses that go through Next ([[Impulses | Continuation]]) to one impulse per game tick. This is useful if you have multiple code branches that may or may not execute at the same time, but you want to run code after all of those branches only once. | ||
Currently, Game Ticks and Framerate are locked and bound to one another. That is until Sauce replaces Unity and the engine threads are made separate. | Currently, Game Ticks and Framerate are locked and bound to one another. That is until Sauce replaces Unity and the engine threads are made separate. | ||
Line 18: | Line 18: | ||
== Inputs == | == Inputs == | ||
=== * (Call) === | === * ([[Impulses | Call]]) === | ||
Tell this node to send an impulse out of Next (Continuation). Will only send one impulse in a game tick, ignoring every subsequent request during the game tick. | Tell this node to send an impulse out of Next ([[Impulses | Continuation]]). Will only send one impulse in a game tick, ignoring every subsequent request during the game tick. | ||
== Outputs == | == Outputs == | ||
=== Next (Continuation) === | === Next ([[Impulses | Continuation]]) === | ||
Will send an impulse only once in a game tick after * (Call) has been called during a game tick. | Will send an impulse only once in a game tick after * ([[Impulses | Call]]) has been called during a game tick. | ||
== Examples == | == Examples == | ||
<gallery widths=480px heights=480px> | |||
File:Protoflux_example_once_per_frame.webp|example of a once per frame being used at the end of multiple paths to prevent the final node chain from being called excessively. | |||
</gallery> | |||
[[Category:ProtoFlux:Flow]] | [[Category:ProtoFlux:Flow]] |
Latest revision as of 20:26, 9 February 2024
Once Per Frame
Flow
This node will restrict the amount of impulses that go through Next ( Continuation) to one impulse per game tick. This is useful if you have multiple code branches that may or may not execute at the same time, but you want to run code after all of those branches only once.
Currently, Game Ticks and Framerate are locked and bound to one another. That is until Sauce replaces Unity and the engine threads are made separate.
Inputs
* ( Call)
Tell this node to send an impulse out of Next ( Continuation). Will only send one impulse in a game tick, ignoring every subsequent request during the game tick.
Outputs
Next ( Continuation)
Will send an impulse only once in a game tick after * ( Call) has been called during a game tick.
Examples
-
example of a once per frame being used at the end of multiple paths to prevent the final node chain from being called excessively.