Making an enemy flash red when hit

So if I’m interpreting correctly, it should work with any node that applies damage to an enemy and not the Start Flash node specifically.

Also I was wondering about something I’ve noticed that seems unusual. In the preview for the hit flash material, there’s nothing being displayed:

particle_preview_03

Whereas every other material I’ve worked on so far has always shown something, such as these two materials:

particle_preview_01

particle_preview_02

Is the preview for the hit flash material supposed to not show anything or is indicative of something not being properly implemented?

If anybody wants my simple workaround, add two rectangle light components in your actors bp, right in front and behind of the actor, then just change boths of the lights color/visibility in your BP as needed. :slight_smile: ez pz xD

1 Like

To make the first solution work, you need to go to project setting and go to “Custom Depth-Stencil Depth” and enable “Enable with Stencil”.

Came across this post as I didn’t find a good answer elsewhere. Anyway with the new update, they added overlay material! random YouTube example

Just gotta slap a dynamic material on your hit-able model, worked for me :slight_smile:

3 Likes

So great! Thanks from China!

1 Like

I call it “mesh lighting”. It seems to be a technique many classic arcade games used to offer feedback to the player.

It seems the general rule of thumb here is that any thing that cannot be taken out from a single attack / projectile needs to use mesh lighting. The way this seems to be accomplished is to quickly change the main colors to something like red.

Granted back then it was not mesh as in 3D meshes but sprites. But mesh lighting is what I am calling it. I first achieved the effect on Mario paint way back in the day, See how I could make things glow by quickly shifting the colors out on something.

Going a step further with this, it seems the mini bosses of many arcade games used a method of mesh lighting that increased in frequency to let the player know just how damaged the boss was , a type of visual gauge without a health bar. With the flashing and frequency thereof increasing. Konami seemed to use that concept to great effect in their games.

This effect can be reproduced using material parameters instead of Post Process. See Action RPG Sample for a simple use case. The parameters are connected to the emissive channel and an event triggered on “Damaged” inside the character BP calls the flash effect.


1 Like