Download

Duplicating UMG Image for each actor

I have a almost complete Minimap, but I need the the target icon image to be duplicated alongside each actor duplicate (like 3 actors on the level, 3 icons), is that possible in UMG without having to repeat the whole BP stuff and a image duplicate in Designer Tab?

Anyone have any idea?

Not sure I follow do you have an example?

Sorry, I think I wasn’t clear, here is a example (used PS for the minimap target icon)

MinimapExample.png

Those white spheres are the targets, the black boxes in the minimap are their representation on it, however, in reality, I can only see one black box representing one of them.

What I want is that if I replicate this actor in the level, then it will also create another UMG Image for the minimap.

Fair enough. We would be looking to in a widget on draw do this logic.

I might take a day or so to get back in this but this radar you are using. Are you drawing theses using its relative location to you. Such as a range of distance where you are always the center?

There is very different math involved when you are always the center verses a map like that stays still and you can be on the top side while another object is bottom left etc.

Basically what I do when drawing a icon to a radar or Minimap is onDraw I use an array for actor to get its location and do the math to get its X and y location it should be drawn in the umg and draw it

This would draw in one for each loop all the actors based on the same math for that array.

How that array gets built depends on how large the world is because you can’t go doing s get actors of class each frame if you have 20k actors :slight_smile: one might just say every few seconds clear the array and build it again.

Honestly, I don’t even know how i’ve managed to make the minimap in just two days, it envolved that a button has a child image, but the button would act like a pivot, where the map image is the one to move around, yet it the pivot is the one who rotates, then I made a division to move it in a near to exact scale of the map, the Target Point have the same basis too, the difference is that it considers the desired actor position.

Nah, it would likely have 3-4 actors in the screen at best for my case.

And now I just had an idea, not sure if that would be indicated, but instead of the Target Point being on my Minimap Widget, I would do in a separate one that would be executed by the trigger itself with a event tick/begin play.

EDIT: Nah that wont work, all of them is going to share the same BP, I would have to create an copy of the Widget for each actor.

Update: i’ve just found what I’ve wanted, a Radar tut to help me

I’ve managed to do a bit of modifications too, it can now change the texture for each dot.

Awesome this is what I was referring to. Least for when you are the center of said radar.

I’ll be posting another info peice in this a bit later when you are not th center of a radar. Such as a “world” map.

So yea, been testing with my triggers and works fine, I was having a headache for hours of a problem of the radar not making the dots disappearing when I just wanna hide, but just fixed that.

Just a question, is there a way to make the HUD order above my Minimap UMG? I did port it to UMG too, but it has issues with opacity change and remove-create back in case of cutscenes.

Cool, PM me when you can.