Forum

> > CS2D > Scripts > Advanced Heath bar
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Advanced Heath bar

9 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Advanced Heath bar

Rainoth
Moderator Off Offline

Zitieren
The concept is simple. You draw a line horizontally and it's width just changes based on your health.

alt Re: Advanced Heath bar

RIP-HereRestsPlookerbooy
BANNED Off Offline

Zitieren
No no no, Itsn't like that, I want to make a HP bar just like in the first picture, 100% identical. I already edited Alistaire Gore Extension to get the Health bar script from it but I want to make one with shadowing and with a layer just like the pictures...

alt Re: Advanced Heath bar

Mora
User Off Offline

Zitieren
Idk which maxhealth do you use, but:
1
2
3
4
5
6
7
8
Max = player(id,'maxhealth')
CurrentHP = player(id,'health')
CurrentDel = Max/CurrentHP
ImageScale=100/CurrentDel

imagescale(img,200/CurrentDel,4)
	
imagepos(img,66+(200/CurrentDel)/2),128,0)
Where img is that 1x1 image.

The same you can change
Max to
Max = maxvalue

and
CurrentHP = value

To make it identical like first one you could use first image:
just 1x1. to scale it,
image which will fill by that 1x1.
Or you could make 2x image of your full health bar:
___50%empty____|____50%image___
So when you'll scale that you don't need much calculations.(i guess.. anyway never used such like that)

alt Re: Advanced Heath bar

RIP-HereRestsPlookerbooy
BANNED Off Offline

Zitieren
user Mora If I made a script using the second one, I'll be able to use it forever.. I can color it, scale it and such..
and sadly the first picture is from a game named WoW If you know it..

alt Re: Advanced Heath bar

Mora
User Off Offline

Zitieren
Why sadly?
You can make your own hud.-. isn't that so hard.
All you need is just add some shadow, or shine transparented on your image, then under the image you scale the one which used as bar.

alt Re: Advanced Heath bar

RIP-HereRestsPlookerbooy
BANNED Off Offline

Zitieren
user Mora:If it was that easy, I would've already done that. Can't you see? That HP bar isn't on a straight line.. there are few cuts(I don't know the word) on the corners
1× editiert, zuletzt 20.01.17 17:44:52

alt Re: Advanced Heath bar

Mora
User Off Offline

Zitieren
Hmm. ye. but you'll leave it as it stay, after your image would be scaled enough(out of borders) it will fill it and the edges still here.
Idk another way than use image with frames.. or adding +one image on the edge of the scaled one, when set it's size -2(to make free space for them) from both sides.

alt Re: Advanced Heath bar

Zeik
User Off Offline

Zitieren
If there is no way to add images in different layers in the HUD (which I think you can't), then there's no easy way to do it. If there is, then you can use an empty bar with shadows, and below it the green bar. Otherwise I think it's not worth the trouble.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht