Do Once node in Blueprints: run something only one time
Do Once lets an execution pulse through only once. It can run again only if its Reset pin is activated. It works like a Do N set to one repetition, with one difference: the Start Closed Boolean pin, which makes it begin as if it had already run.
From the course
Taken from the hands-on project of the course; the lessons show every step on video.
How do I test Do Once?
- Connect Event Tick to a new Do Once and then a Print String with the text TEST. The text prints only once.
- Connect the R key event to Reset: pressing R prints the text again.
What is Start Closed?
A Boolean data pin. When it is on, the Do Once starts closed, as if it had already run once, and only a Reset lets the pulse through. In the lesson, with Start Closed on, nothing prints at the start, but after pressing the key that triggers the Reset the text prints.
When is it useful?
To make sure an action happens a single time even if the event that triggers it fires many times, such as Event Tick or repeated key presses.
Do Once with Event Tick: why it matters
Event Tick fires on every frame, so without a Do Once the Print String would run again and again. Placing the Do Once between the event and the action turns a constant pulse into a single run, and the Reset pin gives you control over when it may run again.
Free PDFs that go with this page
One-page guides made from the lessons, sent by e-mail.
- Flow control nodes — Branch, Switch, loops and gates on one page: what each node does and which pins to know.
- Blueprint Cheat Sheet — A free one-page PDF for Unreal Engine 4/5, made from the lessons of the course. Keep it next to your editor while you learn.
- Free PDFs
Frequently asked questions
What does Do Once do?
It lets the execution pass only one time, until it is reset.
How is Do Once different from Do N?
It has the Start Closed pin, and it is limited to one pass.
What does Start Closed do?
It makes the node begin as if it had already run, so nothing passes until a Reset.