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
Hello friends, i'm making a game that gets a score by the max height the player can reach, but the value of player.y is everytime a float like "108.108846150" and this is poor for the design. So how do I convert this float value "108.108846150" to a simple int "108"? Any ideas?
Set ScoreValue to int(player.y)
Alternately floor(player.y), ceil(player.y), or round(player.y)
Develop games in your browser. Powerful, performant & highly capable.
That's exactly what I wanted, thank you!
Just a thing to tell you that int will alway make the number positive so if you want negative number you will have to use alternative way
int() works for negative numbers.
int(3.14) = 3
int(-3.14) = -4