I think I solved it!
really new to UE4, barely a year in, loving all the community and available info. I thought I’d contribute to this. So I had the same lighting issue, basically trying to use the ui widget to trigger a light animation, you’d press a button and that would play a timeline and increase the point light intensity smoothly instead of an abrupt on/off. The way I did it:
- UI Widget button causes boolean to go true/false let’s call it LightSwitch
- Create an actor blueprint with said point light inside (this is simply because widgets don’t support timeline effects, othwerwise I would have just cast to the point light saving me a lot of time)
- In the new actor blueprint follow the attached images
I had a lot of issues with getting this to work right. at first the animation didn’t reset so when it was triggered again it would just jump to the last frame doing the on/off thing again, after that I got it to reset but it would play continuously for every event tick check so I used a do once to only …well do it once… so that worked but it couldn’t do it again until I reset the do once and I couldn’t reset it when it finished or else it would go in a loop again, so I’m cross-reseting.
After each animation is finished it does a sequence in which it firsts resets the do once for opposite animation prepping it for when I hit the button and 2nd sets the new time to 0 for the opposite animation.
The only problem you might have with this is it’s missing a “default state” of being off so when the game starts even though the button is not pressed, the boolean is off so it plays the off animation once. I bet there’s a way around this like doing a check for the number o presses on the button and only starting the checking process after the button has been pressed once, not when the game starts… but that’s for another time.
I know this is an old thread but this problem gave me some trouble and I thought someone else might benefit from this possible solution.
Best of luck!