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
I know how to generate a random number but it's not doing what I want.
I want it to generate a whole number between 1 and 4.
But when I write in (random(4)) the number 0 comes up too, and I don't want that.
Develop games in your browser. Powerful, performant & highly capable.
random(4) is a number between 0 and 3
it doesn't make sense exactly, but now you know
and any other case to generate a number between something just add a number to it
a number between 10 and 20 would be random(11)+10
Thanks, it works nicely.
You could also just script it with python.