I couldn’t find a question someone wrote when they were struggling to get a flashing invincibility effect on their characters, so I’m posting my answer here in case they stumble upon it later.
They didn’t see at the time how to multiply more than one node together to follow my advice.
Here’s a screenshot of the material. It has more nodes than you need for the effect because it not only does the invincibility effect (yellow), it’s also including a damage flash effect (red) that can be switched on and off by material parameters.
It doesn’t make sense to be able to have a damage effect and an invincibility effect on at the same time, but I believe my materials should be agnostic of the game logic so they’ll just work if I change my mind about something later.
In combination with the yellow flashing, I also have a particle effect component on the character that generates a trail of sparkles as they run along, as long as the invinco effect is active (controlled by a boolean variable on the character pawn class I think).
Whatever changes the invincibility status on the Pawn also flips the material parameter on that pawn’s Dynamic Material Instance IsInvincible to match (1 for true, 0 for false).
I believe since I made this material about 8 years ago, Material nodes have been added to the engine that function more like boolean on/off switches so those might be a better way to go.