Dynamic Bars Using Attribute with Constant Width
Hello guys,
I'm working in a new project and not good with the expression editor/formulas.
I need to create a Dynamic Health Bar using Constrain but the Attribute changes so my bar Width. I want to keep the initial bar width as a constant (50 pixels) even if initial attribute changes. Its that possible?
When the player lose life the bar will get smaller but I want to keep the initial bar equal to any initial valor I put in (ex: 10,20,35,90)
My actual formula is:
char_hp = 20
Constrain Attribute
self.Size.Width to (game.char_hp)*5
If I changes the initial char_hp=90 the bar is too big
If I changes the initial char_hp=10 the bar is too small
Sorry my english and hope you guys understand the problem and someone can help me.
I'm working in a new project and not good with the expression editor/formulas.
I need to create a Dynamic Health Bar using Constrain but the Attribute changes so my bar Width. I want to keep the initial bar width as a constant (50 pixels) even if initial attribute changes. Its that possible?
When the player lose life the bar will get smaller but I want to keep the initial bar equal to any initial valor I put in (ex: 10,20,35,90)
My actual formula is:
char_hp = 20
Constrain Attribute
self.Size.Width to (game.char_hp)*5
If I changes the initial char_hp=90 the bar is too big
If I changes the initial char_hp=10 the bar is too small
Sorry my english and hope you guys understand the problem and someone can help me.
Comments
If not, check out some of his videos - they are simply brilliant. Although I am using the Windows version, everything is starting to make a little sense lol GL with it
Like Balls? Then click here! We've 100 coming soon