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
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?
Develop games in your browser. Powerful, performant & highly capable.
Set ScoreValue to int(player.y)
Alternately floor(player.y), ceil(player.y), or round(player.y)
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