Page 1 of 1

displaying attributes with the hud type verticle

Posted: Wed Jul 26, 2006 6:50 pm
by Jay
when i display an attribute in the HUD, it always goes from down to top (i hope you know waht i mean)


But i want it the other way around so that it goes from top to down.

I hope you know w´hat i mean

Posted: Wed Jul 26, 2006 8:56 pm
by steven8
Not quite sure. Here is a vertical health meter, with the health still going top to bottom:

Image

Is that what you mean?

Posted: Thu Jul 27, 2006 12:23 pm
by Jay
Yes but i want it the other way around. I think we misunderstood in the term 'from top to bottom'

I want that, If the attribute increases, the new part of the bar is added on the bottom and not on the top. i. e. when i would loose health, it would decrease from the bottom.

So like in your picture, but exactly the other way around.

Posted: Thu Jul 27, 2006 1:45 pm
by MakerOfGames
I know what you mean and I would like to have that too. except have it scale from left to the right instead of right to left. Maybe chaning the attriubes to be negative will have it scale backwards. So
Initial = 0
Low = -100
High = 0

I havent tried it. But it might work?

Posted: Thu Jul 27, 2006 1:45 pm
by Juutis
I may be wrong, but I think that can't be done with the hud.ini.

One way I can think of is using a script to draw a box with FillScreenArea() command. You could check the attribute and then set the bottom of the box accordingly.

Posted: Thu Jul 27, 2006 1:51 pm
by Juutis
MakerOfGames wrote:I know what you mean and I would like to have that too. except have it scale from left to the right instead of right to left. Maybe chaning the attriubes to be negative will have it scale backwards. So
Initial = 0
Low = -100
High = 0

I havent tried it. But it might work?
That way it's full when the attribute is 0 and empty when the attribute is -100.

Posted: Thu Jul 27, 2006 2:07 pm
by steven8
He dies. Right away. If you make it a low of a negative number, then try to set it to a partial negative, as would happen when he loses health, he dies. I'm not sure how this could be overridden, if it could.

Posted: Thu Jul 27, 2006 2:23 pm
by Juutis
...but what if the attribute is not 'health'? :wink:

Posted: Thu Jul 27, 2006 7:55 pm
by Jay
it seems that it is possible to invert the 'scale of the attributes' but that does not change the direction of the bar.

initial = -4
low = -1
high = -7

with this, the bar doesn't exist:

initial = -4
low = -7
high = -1


I think the bar doesn't exist because this combinaion is not possible, meaning that there is no attribute...

Posted: Sun Jul 30, 2006 11:39 pm
by MakerOfGames
I GOT IT TO WORK!!!!!!!!
I got my health bar to scale from the bottom to top!

Make the indicator hieght or width negative!
This will cause the indicator to be the hieght or width off from where ever you place it. So my hud height shown in Steven8s picture above is 40 pixels higher than where it is supposed to be with a -40 indicator height. So when It is negative it starts out 40 pixels above the frame. So you will need to make the indicator y or x value even it out.

For example My HUD was:
  • [health]
    type = verticle
    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 = center
    framey = -55
    indicatoroffsetx = 5
    indicatoroffsety = 5
    indicatorheight = 40
Then I changed to this to get the inverse scaling:
  • [health]
    type = verticle
    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 = center
    framey = -55
    indicatoroffsetx = 5
    indicatoroffsety = 45
    indicatorheight = -40
The red text shows what was changed to get the effect.

This is awesome! I wanted my hud to have two or more small scaling bars on the bottom left and right of the screen and each would diminish twords the center of the screen. So now I can do it!

If you need me to explain it better just ask.

Posted: Mon Jul 31, 2006 4:10 am
by steven8
Very Cool!!!! Thanks, MoG!!

Posted: Mon Jul 31, 2006 7:14 am
by Juutis
Ahh, good job!! That's awesome!

Posted: Mon Jul 31, 2006 7:38 pm
by Jay
Wow, cool! :D Thanks!