Example: I have text box called "cooldown" , to subtract five seconds , it appears that way:
5
4
3
2
1
You want to appear that way:
5.0
4.9
4.8
...
0.5 ...
Translated
Thank you =D
create variable with initial value 5
every 0.1 seconds --> subtract 0.1 from variable and set text to variable
variable < 0 --> set variable 0
Develop games in your browser. Powerful, performant & highly capable.
create variable with initial value 5 every 0.1 seconds --> subtract 0.1 from variable and set text to variable variable < 0 --> set variable 0
it works partially, but when it comes to an integer is so:
1 2 3 4 5
I would like to stay so:
0.0 1.0 2.0 3.0 4.0 5.0
I think zeropad(variable,1) will help you.
You can call into JavaScript.
Browser.ExecJS("parseFloat(" & Function.Param(0) & ", 10).toFixed(" & Function.Param(1) & ")")[/code:3tdpp7jt] [url=http://www.blackhornettechnologies.com/Construct2Stuff/FixedDecimal_BHT.capx]http://www.blackhornettechnologies.com/ ... l_BHT.capx[/url]
Thank you for your help, zeropad it's the JavaScript worked perfectly =D