Do Once

From Augmotic Library
< Unreal‎ | API
Inputs
Reset Resets the internal flag of the node to allow it to be triggered again.
Start Closed Preemptively sets the internal flag to the already triggered state. This will not pulse the Completed pin until it is Reset.
Outputs
Completed Pulsed output once the node is triggered.
The equivalent in C++ is to make a "one-shot" condition you want only to run once. This can be done in multiple ways, such as using a bool to return early in a function or adding it to an if-statement.

Overview

Do Once works like a one-shot condition that can be used in various ways, such as making triggers happen once per round or limiting actions during a loop.

By default, the node will start in the un-triggered state, which allows the Completed Output to pulse once the node receives its first Input pulse.

If the need arises, you can start the node at an already triggered state using the Start Closed Input.

Using C++, you can accomplish a similar thing by utilizing a bool variable as a condition to prevent code from executing once used the first time. Which then can be set to false if you need it to be rerun.

Examples

Jump Pad

The Overlap Event will only be allowed to trigger a Character Launch on a Jump Pad once every 8 seconds.