Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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
So I have a simple setup where every 1 second I add 0.1 to a instance variable. Problem being in the debug mode it is adding like 0.1000000000001 every 1 second. Not really sure why is this happening. Any ideas what I may be doing wrong here?
It's the way float values work. You can do this:
Add 0.1 to var
Set var to int((var*10)/10
Develop games in your browser. Powerful, performant & highly capable.
Yep that seemed to do the trick, thank you very much. I was unaware of this with floats.