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
Hi, so I have a world map experiment made up of sprites to represent the land. I have it looping while using A & D to scroll left or right, however I would like to also be able to drag it with the middle mouse button while the sprites maintain their relative position to each other. I have no idea where to start with this.
I've had a look around the forums, but everything I have found seems to be about scrolling the layout rather than just the sprites.
Here's where I'm at so far.
https://www.dropbox.com/s/2ozf9i6tsav4k5z/Infinite%20Scroll%20Experiment.c3p?dl=0
| Global number mouse0 = 0
[Mouse (Pan)]
----+ Mouse: Left button is down
-----> Land: Set X to Self.X-(mouse0-Mouse.X)
----+ System: Every tick
-----> System: Set mouse0 to Mouse.X
Develop games in your browser. Powerful, performant & highly capable.
Sweet! Thanks oosyrag that was a lot simpler than I would have thought! Works like a charm.