Linetrace Message Problem

I have a linetrace that is supposed to send a message to the actor it hits to reveal its hp bar

I’m not sure why this isnt working considering I have another one of these systems for adding damage to my character that pretty much works the same way.

Here are the bp’s

270285-capture2.png

Any help would be appreciated thank you!

Because you NewHidden{T} when ShowingHealth? :smiley: Swap the tick boxes around maybe.

Also, you do it during timeline update, meaning you show / hide every frame; is this intentional?

Also, is the widget in the component set up properly, visible?

I switched the ticks and it works when the line trace hit it but when it doesn’t it won’t send the message to hide the widget, I used the timeline to check when the line trace isn’t hitting so it could hide it.

The widget is also set to visible.

This one is rather straightforward, since the linetrace is not not hitting anything, there’s no object the interface can, well, interface with. At this point the hit result returns null object. Afaik, the interfaces fail gracefully, without complaining about accessing none (not 100% sure here)


How is this supposed work? You look at (line trace) the actor and its widget pops up; when you no longer look, it goes away?

When the line trace hits the actor it reveals the actors widget when the line trace isn’t hitting it’s supposed to hide it.

You’d need a bit extra logic to make it work right:

Image from Gyazo

Essentially, you’d need to store a reference to the last actor looked at, as above.

And the interface implementation in the actor owning the widget:

270364-capture.png

Hope it makes sense.

edit: a screenshot in case the above is hard to see:

Thank you it works perfectly!