Power gauge that increases over time?

Hi there,

Currently I have it so that when you hold down the mouse button a float increases from 0 - 35000 and I print this to screen to see the power you are applying to the next shot. What I want to do is instead of having a numerical value, I draw some kind of power bar that takes the float value and uses it to draw I guess a percentage of the base power value (0) and the Max value (35000).

I’ve seen a few examples but they seem unnecessarily complex for what I need.
these are my current power settings:

Thanks

UMG sounds like what ya need. :slight_smile: If you mean like a progress bar that fills up based on that variable.
You can create a progress bar in UMG, put it where ya want apply that widget to your viewport and set it to that variable.

If you aren’t familiar with UMG look on the Unreal engine channel on Youtube. They have a series setting up a an inventory system that shows plenty of nice things about UMG. :slight_smile:

To elaborate further on AttemptD’s answer: you’ll want to drag a progress bar onto your UMG canvas and in the Details pane you should see Percent. Click on Bind, Create Binding. From there, you’ll want to Get Player Character, Cast to First Person Character, Get Bullet Velocity, Float / Float, Get Bullet Velocity MAX, Return Node.

Hey,
Thanks for the breakdown, but being a little bit of a noob I’ve got stuck at the part where I get my two variabes (Bullet Velocity and Bullet Velocity MAX). I can’t get them to show up on the Power_Bar > GetPercent_0 event graph.
I find it hard in general to manipulate variables from other objects and it’s slightly strange for me as I’m used to working with engines where i can define a variable to be local or global…
Any tips on how I can get these variables I need exposed so I can reference them in my UMG?

Thx

So I changed my two variables to be arrays and everything kind of works now and I can reference them in the Power_Bar>GetPercent_0 bind graph.
My bullet now shoots as it did before and I get the same 0 - 35000 text string displaying for debug purposes, but my power bar doesn’t show up. No errors or anything. Am I close or have I gone off on a massive tangent?

Cheers