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'm trying to spawn objects on specific area of the window. The area is basically the whole window minus the border. I use "Create Object" at random(0,layoutwidth), random(0,layoutHeight).I'm having trouble with the object spawning at the very far bottom of the window, where it's difficult to click. I tried decreasing the numbers but I seems like the randomness is skewed to the left side of the window. My first thought was to create a blank sprite with multiple image points to spawn from. Do I have any alternatives before I do this?
Develop games in your browser. Powerful, performant & highly capable.
Very simply put:
"Create Object" at random(100,layoutwidth-100), random(100,layoutHeight-100)
So just add the pixels offset from the border you would need (in this case 100)
Unless you want to be even more specific about the "randomness"
D'oh! I hurt myself with a facepalm. haha, thanks LittleStain!