I am making an fps multiplayer game. So when i kill a player there needs to be a pop saying +XXX (<— Exp amount). What is the best way of doing this i have tried many of my own ways to get this working but they all failed.
Should i have a widget and set it to visible then hidden again
or use draw text in the HUD?
To get easy: use the hud
To get good: create a widget with a cool text, set a variable that influences the opacity of the text, set a timer that decrease the value of that variable and when it reach 0 call “remove from parent” node (target self) in your widget.
To get very good: create a widget like the previous and keep it on the screen. Every time you kill an enemy call a method w/ a float input where you have to pass the exp amount, every time you call that method refresh the opacity variable to max. Use a float variable to save the exp amount so if the player do a multikill you can show the total amount of exp. You can use the amount of exp to resize the text (obviously with a clamp so you avoid a smaller or a bigger text). Like the previous idea use a variable to set the opacity but when it reach the 0 don’t remove the widget from parent (remember to clamp it or you can decrease the variable under the 0).
Hi rapiidzz901!
Do you get what you wanted?
So I just came in here to recommend you a post that helped me a lot a almost the same thing you are/were searching for: https://forums.unrealengine.com/showthread.php?50130-UMG-Tutorial-Placing-Widgets-Over-Actors-In-Screenspace
You should see the most recent replies in the post to get the all the actualy working stuff… also what Iohoilpotere is a perfect and easy working stuff!
Good luck! Hope it helps!