Ok, I am new here so I will try to explain what I am trying to achieve.
I am working with lighting fixtures and I created one parent blueprint so I can replicate it using several child blueprints later. I have the parent BP called “Parent_Donwlight” and this BP contains one text variable named “Fixture Number”.
So the parent default value would be L000 and the child would have different numbers L001, L002, L003, etc.
What I want to do is to show this variable in my HUD every time I overlap with the child BP, so on the screen, you would able to see the name (Fixture Number) of that specific child.
My widget is working and I can see the text after biding it with the function, but the function I am using right now only shows the parent class default and not the child. How can I access each child’s class default so I can see it on my HUD?
The first image shows the class defaults comparison between the parent and the child.
In the second image, I am showing some nodes for the text binding function that I tried but had no success with.
The last image is just a print screen showing the game, where when you overlap with the lighting fixture it would show its name, but only shows the parent’s name, instead of its child’s name.
The last image is just a print screen
showing the game, where when you
overlap with the lighting fixture it
would show its name, but only shows
the parent’s name, instead of its
child’s name.
Where is the overlap script that triggers it? Can we see it?
I am working with lighting fixtures
and I created one parent blueprint so
I can replicate it using several child
blueprints later.
Sure. Makes perfect sense.
What I want to do is to show this
variable in my HUD every time I
overlap with the child BP, so on the
screen, you would able to see the name
(Fixture Number) of that specific
child.
I’m kind of lost in the logic behind the script here. Hear me out.
there are many fixtures or fixture_child actors in the level
the player walks into them, Begins Overlap
that fixture or fixture_child shows something on the HUD
Does each fixture/child have its own widget display or it’s the player’s hud?
I am a beginner in UE4 so I might be doing things the wrong way, BUT, I created only one widget to be used with all lights.
So far it was working just fine. For example, as you can see on the “example image”, the widget shows “Press 1 to choose beam angles”. When I walk into different fixture_child I can change the beam angles for that specific child.
I thought I could do the same with a variable showing the name. I would change the variable for each child and then it would show on my widget.
I am trying to do that inside the function binding inside my widget. Is that correct? And if that’s correct, I don’t know how to say inside this script how to look for the overlapping trigger.
I used “Get actor of class” but as you said it only gets the first one. I need to get the one that is current overlapping, the problem is how to do that hehehehe…
Reading some info online about casting and combing with what you said about overlapping I did this script and it worked.
I guess that if I want different classes to show when overlapping with different BP, then I will have to create different widgets too, but I think that it won’t be a problem.