I'm working with SBARINFO and trying to draw two separate health bars: one that represents 0 - 100, and one for 100 - 200, with the latter intended to be drawn on top of the former, but only when the player's health is above 100. Is there a good way to do this with SBARINFO? I'm sure this is pretty straightforward to do with zscript, but it would be handy to not have to dive into zscript status bars if I don't have to.
The only good reference I have for this being done in SBARINFO is Psychic, but the sbar in that wad uses a bit of a trick with the overcharge bars by making their height twice the height of the normal 0 - 100 bars, with the bottom half being transparent, but unfortunately that method won't work for me because of the placement on the screen of my health bars and the fact that making a bar begin drawing somewhere off screen to the left seems impossible since negative x numbers just switches the image anchor to be from the right side of the screen. I don't think I've done a stellar job of explaining the trick, but in any case, I'm wondering if there is a way to achieve what I'm looking for without such a trick.
SBARINFO - Drawing an overcharge health bar
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: SBARINFO - Drawing an overcharge health bar
Are you okay if the solution involves ACS and DECORATE?
-
- Posts: 183
- Joined: Mon Jul 31, 2006 6:39 pm
Re: SBARINFO - Drawing an overcharge health bar
Yeah I would be open to it!
Edit: Aha, I discovered that you can actually use offsets even on status bar graphics - so I can use the double-length + first half of image is transparent trick that Psychic uses, despite the bars being in close proximity to the left edge of the screen. So I'm all good!
Thanks so much again though Blue Shadow; your help and time is greatly appreciated
Edit: Aha, I discovered that you can actually use offsets even on status bar graphics - so I can use the double-length + first half of image is transparent trick that Psychic uses, despite the bars being in close proximity to the left edge of the screen. So I'm all good!
Thanks so much again though Blue Shadow; your help and time is greatly appreciated
