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
Having a brain fart on how to set up a vertical slider control for scrolling y over two layers, where slider.y max=windowheight, or layer 1 height, and scrolly max= layoutheight, or layer 0 height.
Im trying set scrolly to lerp(0,layoutheight,... and the rest escapes me atm.
Develop games in your browser. Powerful, performant & highly capable.
A = difference between slider starting y and ending y
B = slider initial position
C = slider maximum value you want
lerp(0, layoutheight, ((slider.y - B) / A) * C)
I think this is it
EDIT: actually, I think you don't even need the lerp() there
Thanks, I think I figured it out.