displaying attributes with the hud type verticle

Topics regarding Scripting with Reality Factory
Post Reply
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

displaying attributes with the hud type verticle

Post 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
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post 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?
Steve Dilworth - Resisting change since 1965!
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post 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.
Everyone can see the difficult, but only the wise can see the simple.
-----
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post 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?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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.
Pain is only psychological.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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.
Pain is only psychological.
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post 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.
Steve Dilworth - Resisting change since 1965!
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

...but what if the attribute is not 'health'? :wink:
Pain is only psychological.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post 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...
Everyone can see the difficult, but only the wise can see the simple.
-----
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post 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.
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 »

Very Cool!!!! Thanks, MoG!!
Steve Dilworth - Resisting change since 1965!
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Ahh, good job!! That's awesome!
Pain is only psychological.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

Wow, cool! :D Thanks!
Everyone can see the difficult, but only the wise can see the simple.
-----
Post Reply