Download

Help: Combining a Static Mesh BP and a Widget in to one BP.

Hi

I recently saw a Video that shows how to make a 3D widget. https://www.youtube.com/watch?v=_LhCKSbGlYY

Now, I would like to add it to a current BP, for example a factory so you can walk up to it and see it’s level, how much money it is making and stuff.

I first thought about making it separately then spawning it when the building is made. But not sure how to reference that “factory” over the other 3 factories for example that are the same BP.

I thought about putting this Widget inside everyone of my BP, but that is going to take forever and may not compensate for terrain level,

How would you go about this?

Regards

Narg

Hi!

I think this is help you:
https://youtube.com/watch?v=M7w9OfPRpKMhttps://www.youtube.com/watch?v=2U_Y2SxfXr8

Hi

Thank you for a quick reply. I like Tesla’s Tuts.

So it looks like attaching to each BP.

I tried spawning from BP, but only kept data from first factory :frowning: Different levels have different materials ans size. 3D widget in the back left.

84e73ff8bc67f63bcb64472492fa30c8b03c9675.jpeg

Looks like I got a lot of copy/Paste to do.

Regards

Narg

Just thinking out loud here. What if you make a meta static object with a 3d widget in it and then inherit all other object from it? This way each of them can have it’s own BP but they all will have a widget as a part of the parent class.

Ok,

1st issue. Never heard of a “Meta Static Object” sorry.

Any help on that and I could look in to it.

Regards

Narg

Sorry my wording wasn’t very technical. What I mean is you can create a base blueprint “Structure”. You add widget logic into it. Then you can inherit your “Factory”, “House”, “Power Plant” blueprints from “Structure” blueprint and have all of the functionality of a parent.
This should be accessible since v4:
https://answers.unrealengine.com/questions/8948/blueprint-cant-inherit-other-blueprint-what-should.html
So you don’t need to copy/paste widget across all of your BP’s, just call their parent functions.

Cheers

I will have a squiz. Have not really played with struts yet, so this might be a good opportunity.

Regards

Narg

That looks perfect.

Except, Do I create based on from the BP or the 3D Widget?

You mentioned Struts, A little new to Struts.

Let us say for example, as per my previous post I have 2 figures, Money and Level in the Factory BP, how would i handle this and promote between the 2.

If I do this the “create based”, do I remove the original Static mesh in this case and replace with the 3d Widget?

Sorry for the NOOB questions.

Regards

Narg

By “Structure” I mean your own custom BP which will be a basis for your more specific BPs. Let’s do another analogy.
Let’s say you have BPs of different cars, you want to have a widget with their level of fuel and health displayed on top of them. So what you can do is make a base BP “Car” (inherit it from what ever you want to use as basis -Actor or Pawn or something else), add widget into it, put some logic of how widget values are updated. Now you can create another BP “Racing Car” by inheriting it from “Car” blueprint and your widget will be already there as a part of the parent.

But If I have this right, I would need in the world, The base BP, my building BP and the Widget BP?

Regards

Narg

Hi

I am a little stuck. I can do it all up to casting to the Health.

My Widget, the ---- is where I want the Data.

bd3364fa3ace97e89fe1b60804c0360dbfeb7bd1.jpeg

Attached to my BP

17ec767ff375ef94ca5d44ad79d3721ed60e910c.jpeg

Can not do the get after cast as it only allows me to cast to a Progress bar. How would I reference A Text Block.

0ccef34d5944062e89b01c59a7e6982c934ff53a.jpeg

Any help would be great

Regards

Narg