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
How can I change strings like "1/4" and "5/10" into floats 0.25 and 0.5?
I've tried to use expression float(), but float("1/4") returns 1, and float("5/10") returns 5.
float(tokenAt("1/4", 0, "/")) / float(tokenAt("1/4", 1, "/"))
float(tokenAt("5/10", 0, "/")) / float(tokenAt("5/10", 1, "/"))
thats pretty slick. nice
Develop games in your browser. Powerful, performant & highly capable.
Thank you. Works perfectly