I made a HUD that displays the Item that you just picked up.
It works, but I want the widget to disappear after X seconds and also, I want it not to overlaps.
Yes because if I take 2 items, the name of those overlaps each other.
PLEASE NOTE!
I know that to delete a widget I’ve to use Remove From Parent.
The problem is that I want the widget to disappear after 2 seconds AND if I use the Delay node, then my Item will spawn with 2 seconds of delay!
Hello and thanks for the answer.
Well, when I take the Pickup it calls the Pickup’sOnActorBeginOverlap
In that event, before REspawning the Pickup, i use a Delay node that waits X seconds before respawning the pickup.
If I add a new delay node for the Widget… well… the two delays add up and then the pickup spawns late
As i understand each time you will pick up item widget must add your view port (with 2 second lifetime) and widget must add every time without 2x delay , yes?
If you just put that behind it can’t you just change the order or use a sequence?
For the none overlap you need to check how many of those widgets are on your screen right now and move it further to another place. Or do a type of event log. That honestly is a lot more complex than a simple “yea just add that node”.
How should they not overlap? Where are they right now? That’s a quite tall order and a significant element of your game.
Yes. I want the widget that displays “You picked up 50+ health!”.
This message must display 2 seconds, BUT without interfering with the original pickup respawn delay.
you can simply add animation to your widget text… move up health text and decrease opacity and you avoid 2 widget collision. Also you can take one main widget and don’t destroy it and when you will pick up second pickup just update its text.
You can create main widgets instance in your_character pawn and save there. Add “change text” function to your widget and when you will pick up healing item , call this function from character pawn.
Now, in the health pickup, when I call the “Change Text” function that I created in the ItemPicked widget, it asks me a ItemPicked reference. Where do I get that variable?
Mhm… “add function “change health” to your third person character which will call “change text” function and it has already item picked reference” that’s not true…
Firstly , please add “Item_picked” widget reference to your third person character. Then from “Add Health” function call this “change text” function which is located in “Item_Picked” widget. Lastly call “Add Health” function from PickUpHealth bp.