# dial indicator

This forum is currently in read-only mode.
0 favourites
• 7 posts
• bit of a dilemma here, see if i can get a solution here before I give up on that hud system.

I'm using the dials as hp indicates etc. the top one is for indicating health now ive tried a few things but im left a little dumbstruck on how to implement the health one. (large arrow) since its odd degrees etc.

end of red = 0 health, vica versa end of blue is 100 health.

http://3.bp.blogspot.com/_3oHN8lpkLvg/S ... -final.jpg

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• dont give up...that art is beautiful.

ok, the equation you need is as follows

get the angle of absolute red, and get the angle of absolute blue

to get the arrow to point to the correct level of health:

(lerp(0,(blueAngle-redAngle),currenthealth/100))+redAngle

• A simpler version of Lucid's expression that does the same things would be this:

lerp(RedAngle, BlueAngle, Health / 100)

i was thinking of the 360-0 gap, when i did the adding thing, but thats at 3oclock not 12 oclock

• hey guys thanks for the speedy replies rotation works great on both equations not knowing my left from right took me a while to implement it ^^! anyways it fully rotates fine now but doesnt stop at the

red or blue angles.

lerp(0,(45-210),(global('Healthplayer')/100))+210

im using set angle to

yea im a nub -_-.

• One thing to keep in mind with Construct is that 90 degrees isn't up, but rather down, and I think that's what your problem might be. So the red angle would be 150 degrees and the blue angle would be 315(although 330 is actually a better fit for your image).

• linkman2004- yea those angles do work much better, thanks.