How to start material filpbook from specific frame

Hi guys,

I have a material with a flipbook playing 4 frames. So the material goes 0-1-2-3-0-1-2-3 etc. When I press a button the material is applied to a widget and so becomes visible on screen.

The problem I am having is that when I press the button I would like the material to play 0-1-2-3, but it’s as if the flibook in the material is constantly playing somewhere in the background even if not applied. So when I press said button I will not always have the animation going 0-1-2-3 but depending on when I press it, I might see the animation going 2-3-0-1 or 1-2-3-0.

How can I tell the flipbook material to always start from frame 0 when I apply it?

Yeah, I tried that, made dynamic material in blueprint construction script and tried with both a static value and a timeline but is not taking the changes, even if I refer to a parameter collection (tried also with material instance). Tried that in both ingame blueprint and widget blueprint. Something is amiss and I think that’s because I’m referring to a widget. I’m kinda running out of options.

I am not a blueprint guy, but I can tell you what you could do in the material so all you need to do is set up the values in blueprint.

The Animation Phase for the flipbook node can have a scalar parameter of 0-1, just activate it trough a blueprint when the button is pressed and have a lerp in the blueprint output the value of 0 to 1 into that scalar parameter.

I dont know how well versed you are with blueprints, and if you are… like me a total blueprint newb we both need to wait until someone else answers that :stuck_out_tongue:

the buddy who I always ask to do the blueprints for me is kinda out of town atm. I’ll forward this to the ue4 slack though. ( http://join.unrealslackers.org/ )

Appreciate it mate. Thanks.

I found part of the problem, I was recalling the dynamic material in the construction script in a material variable which did not accept it because what I actually needed was a material ->interface<- variable (as I had thought the widget is making things hard as I can only apply a material interface to it instead of a regular material). The problem now is that a material interface variable cannot be used as target for a “set scalar parameter value”. Now to try and figure out how to do that.

did you found the solution to this problem?