Try this:
-> OffScreenMouse: Set position to (lerp(SmallScreen2.BBoxRight, SmallScreen2.BBoxLeft, unlerp(SmallScreen.BBoxTop, SmallScreen.BBoxBottom, LayerToLayerY(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y))), lerp(SmallScreen2.BBoxTop, SmallScreen2.BBoxBottom, unlerp(SmallScreen.BBoxLeft, SmallScreen.BBoxRight, LayerToLayerX(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y))))
> {"is-c3-clipboard-data":true,"type":"actions","items":[{"id":"set-position","objectClass":"OffScreenMouse","parameters":{"x":"lerp(SmallScreen2.BBoxRight, SmallScreen2.BBoxLeft, unlerp(SmallScreen.BBoxTop, SmallScreen.BBoxBottom, LayerToLayerY(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y)))","y":"lerp(SmallScreen2.BBoxTop, SmallScreen2.BBoxBottom, unlerp(SmallScreen.BBoxLeft, SmallScreen.BBoxRight, LayerToLayerX(OnscreenMouse.LayerName, SmallScreen.LayerName, OnscreenMouse.X, OnscreenMouse.Y)))"}}]}
This works perfectly, no matter the scale and the scroll. Impressive.
I don't understand how the magic is working, because I don't understand lerp and unlerp, but it does work no matter what I throw at it. Tempted to add rotation to it to see if it continues to work :D
I wonder if this is the simplest way to do it. Rojo's words seem to suggest I've overcomplicated things. I try to avoid using variables, and this seems smart, but I'm going to have to sit down and tinker with it to better understand it.
Thank you.
Edit - Rotation does indeed break it XD But that wasn't what I was trying to learn, so it's still perfect.