Change opacity of flipbook
I am trying to create a flashing effect to my character flipbook when he is hit. Is there a way to change Alpha real time for paperFlipbooks?
asked Oct 12 '14 at 05:21 PM in Blueprint Scripting
Hey Roccinio -
Yes you can change the Opacity at runtime. You will need to create a new base material for the sprite(s) that you want to alter opacity for, you can duplicate the base material to have a good starting point. Before we open the new duplicated Material, Create a Material Parameter Collection in the Content Browser, for our purposes I will call it MPC_Roccinio. In the new MPC, create a New Scalar Parameter, for our purposes I will call it Opacity_Change. From that duplicated Material from earlier, take what is passed into the Opacity and First Pass it through a Multiply node. In the other input of the Multiply node add a Collection Parameter for your MPC_Roccinio that references the Scalar Parameter, Opacity_Change. Now in a Blueprint you can use a timeline to adjust the opacity by calling a Set Scalar Parameter Node which references your Parameter Collection and the Opacity_Change parameter.
A couple of warnings, You will need to be in 4.5.1 for MPC's function correctly there was a bug with 4.5 that was corrected by the hotfix. Also any sprite that references the material which has the particular scalar parameter will be affected by the change. If you want to be able to do the same thing across multiple different material changes you will need to create a new MPC scalar value and a new material
answered Oct 24 '14 at 06:06 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here