Announcement

Collapse
No announcement yet.

Set Visibility of a widget (with closest overlapping actor)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Set Visibility of a widget (with closest overlapping actor)

    Hello !
    I have an equipmentBP which heritate an ArmorBP which finally heritate the armors in my game. I've tried to show the name set in the equipmentBP with my Widget but the problem was that it would show the same name for every actual overlapping actors.
    I've finally decided to show the closest one, so. It works 100%, but don't know how to set on only the visibility of the closest actor/widget.

    Here's what it looks like (with Night_Armor as closest one) :

    Click image for larger version  Name:	img5.jpg Views:	0 Size:	211.0 KB ID:	1721083

    Here are the bp :


    This is the set visibility that I have to do but it shows all widget, obv (you can see the architecture of the actor):

    Click image for larger version  Name:	Img1.png Views:	0 Size:	436.4 KB ID:	1721080

    Here's all the Widget BP, it works in 3 phases :

    1) Get all player's overlapping actors, and put their distance into the 'MinDistance' array;
    2) Get the index of the closest actor
    3) Get his name and his rarity (which setup the color)
    Click image for larger version  Name:	img2.png Views:	0 Size:	275.1 KB ID:	1721081
    Click image for larger version  Name:	img4.png Views:	0 Size:	227.1 KB ID:	1721082
    If you know how to set up the visibility to only the closest one it would help me a lot, I've been trying by all ways for me (CharacterBP, EquipmentBP and WidgetBP) ...
    Last edited by Egnosth; 02-14-2020, 03:42 AM.
Working...
X