Can I change the alpha channel of the tint brush color in my BP Widget from a Timeline?

I am experimenting different ways to obtain the same result just to learn.

I have a BP Character that can take damage and a BP Widget with a border that fills the entire screen. With a little red tint to show the damage taken.

I was wondering if could use a Timeline in my character and start it when damage is taken and link it to a float that get in my BP Widget and change temporarily the alpha channel of the Appearance Brush Color. 0 is by default and when the player gets damage the alpha becomes 0.3 for 0.3 seconds and goes back to 0.

I’ll keep digging, but in case somebody knows a good way of doing this.

Thank You

1 Like
  1. in the widget, create a function to change the opacity of the border/image/…:

  1. in your character, trigger a timeline:

1 Like

I try to understand what you proposed, but I must have done something wrong because it doesn’t work and I get an error.

Don,t forget it ain’t an image it is a border component in my hud.

I want to change the alpha of the tint in the right panel. Appearance, Brush, Tint, Alpha.

the error is because you just created the variable “Border” and therefore has nothing in it.

So, you have a border element:

fig_1

and you set it as a variable:

In the graph, you have access to it, and use it to change the brush or whatever you need:

2 Likes

First of all thank you you are truly generous of your time. Is there something missing? The tint don’t appear when the character gets damage.

Is the event AnyDamage called?
Does the timeline run?

I receive damage so everything else work for this.

I am not sure for the timeline, when I play within the timeline I don’t see any reading head spanning across the keys.

make sure the graph runs as it should. See the flow and put some print strings:

Like you suspected the Timeline does nothing nothing flows.

But Why?

I’ll dig into it.

I can’t get the flow in red with the dots. But when I connect it to a print string with the alpha channel of the timeline I see that is does what I ask 0.3 seconds at 1.0 and then in 0.2 seconds it goes back to 0 and so on.

Now how come it doesn’t change the border?..

Everything seems to flow when debbugging.

My bad the first method that used is from a tutorial, but in the tutorial it was using delays and lots of my colleagues told me in a real pipeline it is better to not use delays. Delays are more for experimenting, but not in an official pipeline.

So I wanted to learn other ways to show the red tint.

But I kept part of the first method that was in myHUD I created a binding to the visibility of the tint, and it was waiting for a some booleans operation to show or don’t show. I removed it and now it works!

Ah the learning curve.

Once again thank you for your help.