Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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
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]
Develop games in your browser. Powerful, performant & highly capable.
Thank you for your help, zeropad it's the JavaScript worked perfectly =D