Download

Health Bar Ticks (League Style) and hud?

Here is my old version of the game I made in GameMaker:
https://www.youtube.com/watch?v=C2A-VA8Vdr0

I’m wanting to make the HUD in UE4 but I’m running into a wall. I don’t know how to get the health ticks working and while I haven’t attempted it I’m guessing that getting the icons in the game and adding a clock-style cooldown timer isn’t going to be easy using blueprints. 2 days of attempting to do this myself has revealed plenty about the engine from a beginner’s perspective but hasn’t really gotten me anywhere.

Check this

Sorry for the delay.

Explanation of Delay:
**I’ve been working through getting this working but I think the issue is that I need 4.8.3 as I’m on 4.8.2 at the moment. For whatever reason I can’t just get 4.8.3? I have 4.8.2 and when I click “Add Versions” I get this:

So I hit resume on Unreal Engine 4.8.2 (even though on the left it said Launch and as far as I can tell I’ve been running 4.8.2 this whole time but who knows) and I’m guessing that 4.8.3 is just a tiny patch on top of 4.8.2 that I have to download AFTER I have 4.8.2 and that’s why I can’t get it at this moment? **

So after I open the example it may show me how to create the effect in blueprints that was shown in the Vine and that might show me how I can do the ticks. If so, then I want to thank you BEFORE you close this tab (or maybe the unreal forums notifies you when someone responds? New here but that’s not a staple of every forum I’ve been on so who knows).

/Rant

No one will close this. Only AnswerHUB Questions will get accepted by some sort (and people answering questions there will get Emails).
But also there, we don’t close questions/threads.

For the question with the UnrealEngine Version 4.8.3. If you have 4.8.2, you should be able to update to 4.8.3 by just hitting the button at your
already added version. Adding a new version will try to add versions like 4.9 or 4.7. But updates to these versions (as well as 4.8), will be
provided through the already added 4.8 Slot. So every higher number at the 3rd part of the version number is just an update (4.8.x).

The updates aren’t tiny. Epic can’t get them smaller. The 1.3GB you are downloading in your picture is the 4.8.3 patch.

A bit before you responded I found that out myself haha. Just came back to this thread to add that while the project was quite nice it really didn’t answer the question I had.

In GameMaker it’s relatively easy.

When I spawn my player character that character spawns an “actor” named hpDraw.
In hpDraw’s step event (Event Tick) I do the following: https://i.gyazo.com/e55b15ced8e83c215e9ff0137c556791.png
In hpDraw’s draw event I then go through all of the colors of rectangles I’m drawing and draw the rectangles at the positions in the arrays. https://i.gyazo.com/eef08efcb46beb257c0d6458caf36224.png

It’s a relatively simple process. Because GameMaker is optimized through pipelines (you don’t want to be calculating things in the draw pipeline and you CAN’T draw outside of the draw pipeline) I do all of the calculations in the step event. I’m assuming that UE4 doesn’t have anything similar but I’m just trying to figure out how to add these ticks to my health bars.

My end goal is the hud from that video in a 3D space that rotates to face the player (enemies have abilities and whatnot as well; players will have their hud drawn on the hud canvas and thus don’t need to rotate but nonetheless the health tick functionality is missing)

I’m going to go back to experimenting with the event graph. I think that I can calculate that there and then draw rectangles in a foreach loop out of an array? Just trying to optimize. Probably shouldn’t be optimizing this early in the project but I prefer to get things done right the first time when it comes to programming D:

Well. I ran into a stumbling block VERY early. That being that there’s no way to simply draw a rectangle.

Attempt 1: Well… borders look like the closest thing to what I’m looking for… can’t make them ingame though.
Attempt 2: Well, maybe I can just make 10 of them, make them invisible or “behind” the health bar until I need them, and simply adjust their X,Y position? Nope… nope there’s no way to even interact with a border. Well then.

I strongly believe that the health ticks are a fundamental part of my UI and don’t understand why something so simple is so difficult in Unreal. I realize that nothing’s ever simple but I mean. It’s just drawing to a plane o.O

Hey there,

please don’t make double posts! (: There is an EDIT Button for each post. You are only allowed to bump threads that are unanswered for more then 4 days.

It would be way easier to help you if you would provide screenshots of what you’ve tried so far.

You are telling me that you spawn a HUD Actor in the other Engine. Ok, that is totally possible here too.
You can create a so called “WIDGET” that also has the Event Graph to calculate things and an Event Tick function.
So you can recreate your logic. Widgets have some basic things you can use. Either draw normal images, or directly
use a progressbar. I’m pretty sure that you can use the Progress bar, combined with your Tick calculation to recreate
this setup.

You can then use “Create Widget” in your CharacterBP and Add this to the viewport.

To be honest, this is not really difficult. You need to step back from the Framework of the other Engine
and first learn Unreals Framework. Otherwise you will always sit there thinking “Hm this worked this way in
GameMaker, why not here?”. That’s not the way to learn an Engine. I had the same Problem when moving away
from Unity more than a year ago. (: You can use your calculation logic, but the rest should be forgotten.

I got the 3D rendering of Rectangles to work and some simplistic health handling code that sets the visibility of the rectangles based on the players health. It doesn’t yet read the players variable because I’m working on the casting but this should help you out a bit I hope c:

Losing health and my complex casting logic c:

I actually knew about the widgets and whatnot. I spent plenty of time learning the engine and understand that this is a whole other ballgame so to speak. I just wanted to show how I’d achieved it in the other engine.

This was incredibly helpful and I appreciate it a ton. This is exactly what I was planning on doing after thinking about it and am glad to come back to find that it’s been done for me (as I can then see the “right” way to do it). Sorry for the crazy late response but I was without internet and my computer for a couple weeks while visiting family. I REALLY appreciate your time and effort!