Need help with my HUD

Discuss any other topics here
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Changed the center object to 256x64 and no luck. All I have is this. And that is what I got after I copied the Health code from Hike1 and changed the position and name of the frame and indicator. I can't seem to get more than this no matter what I try.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Just so I dont have to edit:

Note its the 311x50 pixel bitmap frame with alpha that is showing.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

steven8 wrote:They don't have to be a power of 2, as you actually tell the engine what size to draw the image on the screen. You, however, have to cut out the center of the alpha frame to allow the indicator to show. I got it to show by doing that.
Cut out the center of the alpha frame? That worked? What do you mean by cut it out?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post by steven8 »

But you are using the a_white_frame_center as your alhpa for the frame. I cut out that center rectangle, and the indicator show through. The alpha map has to have a cutout to let the indicator show through. I didn't resize anything.

I'll grab a screen and post it up.
Steve Dilworth - Resisting change since 1965!
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post by steven8 »

I grabbed a rectangle in of it in irfanview and cut selection to make it white. then saved it back to the same file.
Steve Dilworth - Resisting change since 1965!
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

OHHH I GOT IT! THANK YOU VERY MUCH!!! :D :D :D :D

Now what happened there? The frame alpha overides the indicators alpha? So, the frame alpha goes over the indicator, and since it had the clear center it applied that alpha to the indicator?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

YEAH!! Now with a little tweaking I will get what I want. Thanks again! That was driving me crazy. I just applied the 192,192,192 gray to the center of the a_white_frame and the indicator is the desired transparentcy.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Now, wait a second, I just realized, is that the indicator showing up or is that the white_frame shoing up? Did you test it with applying damage?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

I did what you said, make it white, but that seems to be the white_center showing. I changed player health to 50 in the player.ini and got this:
The same result when I cut the center out of the frame alpha.

Well, I reached my upload limit... Guess I need to delete some pics in other posts... I need to get an online place to post all these images...
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post by steven8 »

Okay, I've been looking at it. I had a black center, which I though was your indicator, but now that I changed the color, all I had was white. I'm still checking. We are on the right track, but it is not quite right. thing is, also, we were calling it vertical, when it is horizontal. Correct?
Steve Dilworth - Resisting change since 1965!
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

Ok, I actually tried your bitmaps and they work fine, but there are 2 things:
make sure that in the playersetup entity in your level you specified the correct attribute file (in the basic level that ships with RF it is attribute.ini, in other levels it may be player.ini or something else)

in the hud.ini add
[health]
type = horizontal
frame = hud\white_frame_center.bmp
framealpha = hud\a_white_frame_center.bmp
indicator = hud\center_black.bmp
indicatoralpha = hud\a_center_black2.bmp
framex = 169
framey = -55
indicatoroffsetx = 6
indicatoroffsety = 5
indicatorwidth = 300

your health bar is definitly horizontal; for a horizontal indicator you only need to specify the indicatorwidth, indicatorheight is not used; active is true by default

btw, there's an edit button for posts in this forum ;-)
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Oh, other sizes work too... well, you learn something new every day. :D

Thank you for correcting me, by the way.
Pain is only psychological.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

I wasn't quite sure about it, too. However keeping the size of your images a power of 2 is always a good idea.
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post by steven8 »

Son of a gun!! And here it is with 50 % health to start.

Image

I was way out on a limb. This is marked horizontal, with all you original bitmaps. and I knew about the player.ini and forgot to mention it.

I used QOD's hud.ini text, except I erased the hud/ [art of the bitmap paths.

I am so sorry. I got twisted around myself, and took you with me. Thank you, QOD. :D
Steve Dilworth - Resisting change since 1965!
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Ok, I copied the Health section code of yours QuestOfDreams, but now I have a black line right on the left edge of the health bar frame. Also, I dont have attribute.ini, only player.
Also, I cant make a verticla health bar if its wider than it is tall?

EDIT: in player.ini health is so:

Code: Select all

[health]
initial = 50
low = 0
high = 100
HUD.ini is so:

Code: Select all

[health]
type = horizontal
frame = hud\white_frame_center.bmp
framealpha = hud\a_white_frame_center.bmp
indicator = hud\center_black.bmp
indicatoralpha = hud\a_center_black2.bmp
framex = 169
framey = -55
indicatoroffsetx = 6
indicatoroffsety = 5
indicatorwidth = 300 
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
Post Reply