Setting a maximum length for a breath bar.
billythebeast666
Member Posts: 3
In my game the user must get as high as possible by collecting bubbles to refill their breath bar. The breath bar decreases over time. The problem i am having is that if you collect lots of bubbles the breath bar gets extremely long, i want to have it just refill it maximum, not just keep on making it longer. how do i do this?
Thanks
Thanks
Comments
If it does, lets say your attribute is called 'breath' and the max you want it to go to is 10.
When your hero collects a bubble have a rule that changes the attribute 'breath' to 'breath + 1' if 'breath' is less than 10
Like I said i'm not sure how you are performing this action so if this example doesn't help you it will be faster for you to post a snip of your code. Goodluck
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
thanks everyone