Help with temporary invincibility

Recently in the game I’m making, I’ve been attempting to implement a period of temporary invulnerability to damage after the player character has taken a hit like you see in a lot of old-school games.

I’ve already managed to incorporate the temporary invulnerability but now I need some sort of visual indicator of when the temporary invulnerability has expired. In older games the player’s sprite would begin to flicker while invulnerable; an effect achieved by rapidly alternating between enabling/disabling the visibility of the player character’s sprite.

I would like to to be able to feature flickering effect in my own 3D side-scrolling game but I’m not exactly sure on how to go about creating effect.

Any help whatsoever would be greatly appreciated!

Player damage blueprint:

For something super simple, might be enough:

Image from Gyazo

A more nuanced effect is better done directly in the material.

2 Likes

Thanks for the help but what type of variable is that after Set Timer by Event? I can’t tell from the screenshot.

  • Timer Handle

Mouse over pins to see their type:

340003-screenshot-1.png

Right click to promote to the variable of the correct type automatically:

340004-screenshot-2.png

Thanks again, that worked perfectly aside from some weird blurring visual effect that sometimes occurs while moving at full speed after taking damage.

Yea, Motion Blur + Temporal AA is quite something in UE4, you could try :

Thanks once again, that worked.