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!