ACS Prefab Database

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

okay! Here's the script for the HP bar!
HP Bar script -
Spoiler:
EDIT: I just realized I didn't document the code enough. But it's documented enough to get a general idea for what i did.

EDIT2: HOLY SHIT THAT'S A MESSY MAP! *Fixes script and map so it's half-way descent*
Attachments
hpbardemo.zip
And the resource wad/demo for it.
(3.36 KiB) Downloaded 2181 times
Last edited by Apothem on Sat Oct 01, 2005 10:22 pm, edited 1 time in total.
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

nice job Apothem, I like the gfx you made for it.

/me implements script into prototype map07 of DemonicLair.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

I didn't make them, solarsnowfall did. As he is my GFX designer for the time being :P

EDIT: God damn it people, I wanna see someone else make some contributions!! :?
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

Let me go dig out my old HP bar script. It's accurate to 1HP thanks to a few tricks in segmentation, and you can scale it to however many lifebars of 100 you need, up to as many colors as there are for letters.
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

can you have more then one hp bar? if so.....
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

What the code does is draw two bars if the target has over 100 life. It uses the color of the bar divided by 100 to draw the back bar, then calculates the bar for the remainder and draws that overtop. It kinda works the same way that the life bars worked in most street brawler games.
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

actually I was talking about Apothem's hp bar, and asking him.
User avatar
Siggi
Posts: 3288
Joined: Sun Oct 03, 2004 8:57 am
Preferred Pronouns: They/Them
Location: South Africa

Post by Siggi »

Make yourself more clear next time...
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

If you want to have more than one bar, just copy-paste the script and replace the variables at the top with the appropriate numbers.
User avatar
Shadelight
Posts: 5113
Joined: Fri May 20, 2005 11:16 am
Location: Labrynna

Post by Shadelight »

thanks for the info Apothem, this'll come in handy.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

DoomRater wrote:What the code does is draw two bars if the target has over 100 life. It uses the color of the bar divided by 100 to draw the back bar, then calculates the bar for the remainder and draws that overtop. It kinda works the same way that the life bars worked in most street brawler games.
I know what you're talking about, I did the same thing for the overshield effect with the shieldtest.wad... Speaking of which I should also post that here as well.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Gah! All this code is so inefficent! >.<
I see no abstraction, no for loops... IYAA!
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

You'll see mine soon enough. The actual output on HUD_Message is messy however but it does work.
Spoiler:
And here's the WAD that uses it...

http://rapidshare.de/files/5816130/brain.WAD.html

It's in a sector where you cannot die so feel free to go nuts on it. Only problem as you can see is it's designed to be used with a lifebar font and I don't have one, and I don't know how to build one either... Each letter is 8 pixels wide and A has one pixel colored from the left, B has two, etc.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

I had an excellent smooth health bar script that I stashed somewhere. I gave part of it to Risen and he did some killer stuff with it cause he rocks like that.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Post by Apothem »

I think that's good enough for HP Bar scripts.... We need more variety here! C'mon lets see something unique. 8-)
Locked

Return to “Editing (Archive)”