# How to execute a function during widget animation

**URL:** <https://forums.unrealengine.com/t/how-to-execute-a-function-during-widget-animation/477262>\
**Category:** UI\
**Tags:** unreal-engine, UI, Blueprint, question\
**Created:** [January 14, 2021, 3:22pm UTC](https://forums.unrealengine.com/t/how-to-execute-a-function-during-widget-animation/477262 "2021-01-14T15:22:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KielanT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KielanT](https://forums.unrealengine.com/u/KielanT)\
**Post date:** [January 14, 2021, 3:22pm UTC](https://forums.unrealengine.com/t/how-to-execute-a-function-during-widget-animation/477262/1 "2021-01-14T15:22:25Z")

</div>

Hi,  
I have a widget animation that says 3, 2, 1, go!. I have an on animation finish event that calls a function from my c++ game mode, This means that that you can’t actually move until the animation is finished, I would like to have the player be able to move when the go pops up rather than when it disappears. Is there a way to call a function when the animation hits a specific second on the timeline?

Thank you

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [January 14, 2021, 4:05pm UTC](https://forums.unrealengine.com/t/how-to-execute-a-function-during-widget-animation/477262/2 "2021-01-14T16:05:03Z")

</div>

You can do it like so:

[https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1817869-can-you-animate-a-dynamic-material-parameter-in-umg-widget-timeline?p=1817878#post1817878](https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1817869-can-you-animate-a-dynamic-material-parameter-in-umg-widget-timeline?p=1817878#post1817878)

---

<div class="post-metadata">

**Author:** ![KielanT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KielanT](https://forums.unrealengine.com/u/KielanT)\
**Post date:** [January 14, 2021, 4:24pm UTC](https://forums.unrealengine.com/t/how-to-execute-a-function-during-widget-animation/477262/3 "2021-01-14T16:24:49Z")

</div>

Awesome, thank you

---

<div class="post-metadata">

**Author:** ![mattai](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mattai/32/731470_2.png) [@mattai](https://forums.unrealengine.com/u/mattai)\
**Post date:** [September 30, 2023, 7:13pm UTC](https://forums.unrealengine.com/t/how-to-execute-a-function-during-widget-animation/477262/4 "2023-09-30T19:13:48Z")

</div>

The previously posted link is broken, but I believe this is the working version in case anyone else lands here.

> [@Can you animate a dynamic material parameter in UMG widget timeline?](https://forums.unrealengine.com/t/can-you-animate-a-dynamic-material-parameter-in-umg-widget-timeline/151529):
>
> So in the graph of my widget I can create a dynamic material instance. I can then use “Set scalar parameter value” to change a parameter on it in blueprints. I’d like to be able to change this parameter on the timeline so the designer can edit fade in times etc but do not see a way to select it. Is this possible or am I limited to linear onframe changing?
