Local Leaky Impulse Bucket is a ProtoFlux node that will count how many impulses have been sent to it through Trigger (Call), and if the capacity goes over MaximumCapacity (int) it will send an impulse. The CurrentCapacity (int) is local for every user.
Note: There is currently a bug with this node where it will send impulses out of Overflow (Continuation) regardless of it's capacity when it should be when it overflows past the number specified in MaximumCapacity (int) issue 145.
Inputs
Trigger (Call)
Add one to CurrentCapacity (int) and send an impulse out of Pulse (Call).
Reset (Call)
Will reset CurrentCapacity (int) for the local user.
Interval (float)
How many seconds that the node will keep impulses for before one """leaks out the bottom of the bucket""", decreasing CurrentCapacity (int) by one for the local user.
MaximumCapacity (int)
The maximum amount of Impulses that this node can store locally till the next impulse would go out of Overflow (Continuation) instead of Pulse (Call)***.
***: See note above.
Outputs
CurrentCapacity (int)
Will increase by one every time Trigger (Call) is impulsed. it will decrease by one every Interval (float) seconds. It will also reset to 0 when Reset (Call) is impulsed.
Overflow (Continuation)
this will send an impulse when MaximumCapacity (int) is equal to CurrentCapacity (int) locally and Trigger (Call) is impulsed***.
***: See note above.
Pulse (Call)
Fires every time Trigger (Call) is impulsed unless MaximumCapacity (int) is equal to CurrentCapacity (int) locally then it will go out of Overflow (Continuation)***.
***: See note above.
Examples
-
Local leaky Impulse Bucket being used on a button that plays an alternative audio clip only if it is pressed many times very quickly in a row.