Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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
Hi all,
i want to limit my character from moving far away from a scrolling object {which the character is attched to}. How can i write the expression - if the X is bigger than a number, then ignore the input from the "Right/left button". I cant figure the first part- how to get the X coordinates of an object + the distance i need for reaching the limit.
thanks!
Develop games in your browser. Powerful, performant & highly capable.
Something like this would work
x > object.x+200
You could also use the clamp expression
clamp(x, lower, upper)
so something like clamp(player.x,object.x-200,object.x+200)