91
Resolved Questions / [SOLVED] Time bar
« on: March 13, 2015, 01:36:21 am »
Hi!
I want to use a bar which shows how much time (seconds) do you have until... you run out of time
So I use When Drawing where the width goes from Number Attribute which decremented by 0.25 every 0.25 seconds. Which works fine. The problem is that when I need this effect again it's multiplied. For instance, an actor got a temporary bonus (a shield) which expires in 10 seconds. When it's almost done he got another bonus. In this case the bar goes faster because the code where Number Attribute decremented by 0.25 every 0.25 seconds has been read twice.
It seems like a very simple task but I can't wrap my head around this problem. Please, help!
I want to use a bar which shows how much time (seconds) do you have until... you run out of time

So I use When Drawing where the width goes from Number Attribute which decremented by 0.25 every 0.25 seconds. Which works fine. The problem is that when I need this effect again it's multiplied. For instance, an actor got a temporary bonus (a shield) which expires in 10 seconds. When it's almost done he got another bonus. In this case the bar goes faster because the code where Number Attribute decremented by 0.25 every 0.25 seconds has been read twice.
It seems like a very simple task but I can't wrap my head around this problem. Please, help!