# Buffer an Action

> For the complete documentation index, see [llms.txt](llms.txt).

Let the player press an action early and see it execute when a montage window ends. Use the controller from [First Steps](ipt-first-steps.html) and a montage you can already play on the locally controlled pawn.

Procedure: Set up a visible response

1. Create a Boolean action with a Pressed trigger and map it to a spare key. In the active Input Setup, add Debug: Show String. Assign the action and set its display string to Released {action} for {pawn}.

2. Enable Can Be Buffered on that handler and choose `Input.Buffer.Channel.Default` as its Buffer Channel Tag. On the Input Manager, set Input Buffer Mode to Last Command.

Procedure: Mark the window

1. In the montage notify track, add the Input Buffer Notify State. Place it across a visible stretch of the animation and end it a few frames before the montage ends. Set its Buffer Channel Tag to the same tag as the handler.

2. Save the montage and play it on the local player. To control the window from an ability or another Blueprint instead, use Open Input Buffer and Close Input Buffer on the enabled buffer with that same tag.

![Opening and closing a buffer channel from Blueprint](Documentation/ipt_input_buffer_blueprint.png)

## Try It in Play

Press once before the montage. The message should appear immediately. Play the montage and press twice inside the window. Expect one message at the normal close. Press again afterward and expect an immediate message. To test cancellation explicitly, open the channel in Blueprint, press the key, and close it with Cancelled enabled. The pending message should be discarded. If every press runs immediately, compare the channel tags and confirm buffering is enabled on both the manager and the handler.

