add delay with data |
TheAutopilot (talk | contribs) m adjusted example height |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
|Inputs= | |Inputs= | ||
[ | [ | ||
{"Name": "*", "Type": " | {"Name": "*", "Type": "AsyncCall"}, | ||
{"Name": "Value", "Type": "Dummy"}, | {"Name": "Value", "Type": "Dummy"}, | ||
{"Name": "Duration", "Type": "Dummy"} | {"Name": "Duration", "Type": "Dummy"} | ||
Line 11: | Line 11: | ||
[ | [ | ||
{"Name": "Next", "Type":"Continuation"}, | {"Name": "Next", "Type":"Continuation"}, | ||
{"Name": "OnTriggered", "Type":" | {"Name": "OnTriggered", "Type":"SyncResumption"}, | ||
{"Name": "DelayedValue", "Type":"Dummy"} | {"Name": "DelayedValue", "Type":"Dummy"} | ||
] | ] | ||
|}} | |}} | ||
Delay With Data is a ProtoFlux node that allows for delaying an [[Impulses#Async|Async]] execution for the provided Duration (Pseudo-generic) before continuing. It will also carry over a Value (Generic) during the delay and output it to DelayedValue (Generic) when Next ([[Impulses|Continuation]]) fires. | |||
[[ | == Inputs == | ||
=== * ([[Impulses#Async|AsyncCall]]) === | |||
Start the delay. | |||
=== Value (Generic) === | |||
The value to delay for Duration (Pseudo-generic) time. | |||
=== Duration (Pseudo-generic) === | |||
How long to delay for in seconds or timespan. | |||
Examples: [[Type:Double | Double]], [[Type:Float | Float]], [[Type:Int | Int]] and [[Type:TimeSpan | TimeSpan]]. | |||
== Outputs == | |||
=== Next ([[Impulses|Continuation]]) === | |||
Fires after Duration (Pseudo-generic) time has passed after * ([[Impulses#Async|AsyncCall]]) was called. DelayedValue (Generic) during this impulse will have the value of what was put into Value (Generic) when * ([[Impulses#Async|AsyncCall]]) was called. | |||
=== OnTriggered ([[Impulses#Async|SyncResumption]]) === | |||
Fires instantly after * ([[Impulses#Async|AsyncCall]]) is called. | |||
=== DelayedValue (Generic) === | |||
this will have the value of what was put into Value (Generic) when * ([[Impulses#Async|AsyncCall]]) was called during the Next ([[Impulses|Continuation]]) impulse. | |||
== Examples == | |||
<gallery widths=480px heights=340px> | |||
File:Protoflux_example_Delay With Data.webp|Delay With Data being used as a way to display where the user was 5 seconds ago | |||
</gallery> |
Latest revision as of 15:02, 1 December 2024
Delay With Data is a ProtoFlux node that allows for delaying an Async execution for the provided Duration (Pseudo-generic) before continuing. It will also carry over a Value (Generic) during the delay and output it to DelayedValue (Generic) when Next (Continuation) fires.
Inputs
* (AsyncCall)
Start the delay.
Value (Generic)
The value to delay for Duration (Pseudo-generic) time.
Duration (Pseudo-generic)
How long to delay for in seconds or timespan.
Outputs
Next (Continuation)
Fires after Duration (Pseudo-generic) time has passed after * (AsyncCall) was called. DelayedValue (Generic) during this impulse will have the value of what was put into Value (Generic) when * (AsyncCall) was called.
OnTriggered (SyncResumption)
Fires instantly after * (AsyncCall) is called.
DelayedValue (Generic)
this will have the value of what was put into Value (Generic) when * (AsyncCall) was called during the Next (Continuation) impulse.
Examples
-
Delay With Data being used as a way to display where the user was 5 seconds ago