Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 1,007 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Quick help with health bars #282989
08/05/09 05:14
08/05/09 05:14
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Hello 3dgs community. I need some help with a health bar code. I am currently stuck and very frustrated with this problem I am having. In short, my heal bar works but it doesnt scale properly. It seems all of the health bar codes are only meant to work with perfectly rectangular bars. However, my health bar is shaped like this...



I suppose I could have a seperate image for every point and use something like...

if(health<=30)
{
use panel 1
}
if(health<60 && health>30)
{
use panel 2
}
etc...

However, I dont want to have to use this method. Isn't there some easier way to achieve a properly functioning health bar that doesn't HAVE to be a rectangle??? In short, I am trying to achieve this...



Last edited by exile; 08/05/09 05:21.
Re: Quick help with health bars [Re: exile] #282991
08/05/09 06:05
08/05/09 06:05
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
search in the AUM'S, there is a code in there for health bars, and is uses a colored health bar sample. this could be the basis for what your trying to achieve.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: Quick help with health bars [Re: Blink] #282994
08/05/09 06:21
08/05/09 06:21
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
well I already have a working health bar code. The problem lies in the way A7 allows panels to be altered. The only thing I can think of would be to find some way to mask panels during runtime. Like somehow creating an alpha channel based on how much health has been lost and applying said channel to the image.

I wanted to use the "window" command to scale my panels, and in actuality its what I need. However, the "window" command only moves the bmapbehind the window. If there was a way to keep the bmap in a location and move the window, i'd be in business.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1