Some simple problem with an interface and how to access a variable ?

I have some simple logic to show enemy’s widget’s when they come in close proximity to player character. So on this collision box everything works fine with a “cast to main enemy” node. I want to replace it tough for an interface.

This is how this works with cast to node (everything works fine)

And here how the interface looks like in the base main enemy BP

And back to the player character with where i call the new interface logic but this isn’t working…

But it starts to work if i connect the “cast to node” directly to the interface “main enemy”
So i guess this single “main enemy” variable isn’t working correctly if it is set like this.

So what do i connect in the interface “main enemy” input if i want to get rid of the cast to node ?

1 Like

True, i can remove them and just set the widget directly to Set visibility. But what do i do on the player character (last 2 screenshots) ?

1 Like

Same as the last picture,except it doesn’t have those two input pin,

Edit:the one above the last one…

1 Like

Oh i see it works now, gg bro :grin: :v:

thx a lot

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.