ON DELAY - ignorantbliss/nba GitHub Wiki

An On Delay scripting node is used to keep a value 'off' for a certain amount of time after the incoming signal changes to '1'.

Inputs

1> Signal: An incoming signal, often an activation.

Outputs

1> Output: An output signal, either '1' or '0'

Options

1> Time To Wait: The amount of time (in seconds) to hold the signal off

Usage

This node is used if you want to add a delay between an event starting and something else in your scene responding. It also helps 'filter out' very short events, like accidental Button presses.

When the input value is zero, the output value is '0'. When the input value becomes //non-zero//, the output value will remain '0' for the specified number of seconds before it jumps to '1'.

Examples

Filtering Out a Short Touch

Players keep accidentally or lightly tapping a button, and don't realise that a door opened in response. To make sure the player deliberately pressed the button, you can add an On Delay node between the button and the door, meaning the Player must stand on the button for more than 1 second before it activates.

See Also

Off Delay
Ticktock