Files

> > CS2D > Lua Scripts > [CSP] Healthbar [v 1.1] -script-
Files overviewCS2D overviewLua Scripts overview

English [CSP] Healthbar [v 1.1] -script- >

35 comments3 kb, 897 Downloads

old [CSP] Healthbar [v 1.1] -script-

Alistaire
User Off Offline

So I've made a healthbar script to beat all the others. It's a pretty easy one but it looks way better than some ugly 'colorjumping' one which changes on damage only, and it's not as CPU-demanding as e.g the ones that use a super complex code with angles and shit.

Enjoy,

~Alistaire

----

There are 3 modes;

HB_mode = 1 ; Healthbar goes from sides to middle
HB_mode = 2 ; Healthbar goes from left to right
HB_mode = 3 ; Healthbar goes from right to left

----

Updates:

[1.1]     Hpbar updates at hit
edited 3×, last 05.07.12 03:54:26 pm
Approved by Yates

Download Download

3 kb, 897 Downloads

Comments

35 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Alistaire
User Off Offline

If you use that method the scale will be 100 times the normal size at max health.

old

Infinite Rain
Reviewer Off Offline

Alistaire with my way you can do more things.
And actually I using per cent maths rule
I like it!

old

Fiz
User Off Offline

@user Alistaire:
1: Lol, thanks I guess...
2: ..oops
I like it!

old

Alistaire
User Off Offline

@user Fiz

1. I've added your request
2. I didn't spell it wrong

old

buraxia3
User Off Offline

@user Fiz:are you expecting something like mirror effect?
I like it!

old

Fiz
User Off Offline

Quote
?tfel ot thgir morf daer uoy oD

Do I read from right to left? Nope, but if you look in most if not all classic hp bar-needed games, you will see what I mean. Take Age of empires for example, or minecraft, or most tower-defence games...
btw, you spelt 'right' wrong backwards.
I like it!

old

buraxia3
User Off Offline

Good idea, but..
What happens on fog? And isn't it not allowing you to hide?
I like it!

old

Alistaire
User Off Offline

@user Infinite Rain

Actually it's;

1
2
local d = player(id, 'health') / player(id, 'maxhealth')
imagescale(healthbar[id], d, 1)

old

Infinite Rain
Reviewer Off Offline

Well colculating is way easy.
1
2
local d = (currenthealth * 100) / maxhealth
imagescale(healthbarID, d * barsize, 1)

lol

Script is mega awesome
I like it!

old

BcY
Reviewer Off Offline

very good idea.thanks alistaire
I like it!

old

Alistaire
User Off Offline

@user Fiz

?tfel ot thgir morf daer uoy oD

old

Cure Pikachu
User Off Offline

I'll like that.
I think I'll use this for my mission map that has health regeneration.
EDIT: It kinda bugs me that the health bar is covering part of my weapons... And yay, new mode!
I like it!
edited 2×, last 28.05.12 04:12:51 pm

old

Fiz
User Off Offline

It should go from right to left...
I like it!

old

Apache uwu
User Off Offline

tbh: I don't see much difference.

However since you used the correct way to calculate color from percentage in health--I'll like it.
I like it!

old

Misho
User Off Offline

Finaly a good HealthBar script.
Great job!
I like it!
To the start Previous 1 2 Next To the start