Need help converting smooth scrolling prototype to ScrollX

Get help using Construct 2

Post » Wed Jun 28, 2017 2:20 am

I've managed to make a smooth scrolling prototype for a game i'm testing, but i need to convert it to make it behave a similar way, but making the camera move instead of the background.

I've tried many attempts to get the scroll X working, but i can't quite replicated what i have here. Please see the capx link for an example. (Click and drag to scroll the view, then let go for it to slow to a stop.

example: https://dl.dropboxusercontent.com/u/403 ... gTest.capx

The goal: to drag the virtual camera (ScrollX) left and right matching the mouse 1:1. Then when you let go, it continues to scroll slowing to a stop.

Image
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Wed Jul 05, 2017 3:46 pm

https://drive.google.com/open?id=0B-xiq ... 0xDel9TRHM
an old zoom and pan example that I have lying around.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Thu Jul 06, 2017 6:48 pm

@gumshoe2029 - Thanks for the file!

The mousewheel zoom seems to work, but panning doesnt seem to function. Is there anything in need to tweak?

thanks!
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Fri Jul 07, 2017 9:20 pm

https://www.dropbox.com/s/za4y5hjpcl98o ... .capx?dl=0

Adjust Max Speed and Deceleration to your liking.
As well as event 4, currently that stops the existing movement in 1 second.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jul 14, 2017 6:51 pm

justifun wrote:@gumshoe2029 - Thanks for the file!

The mousewheel zoom seems to work, but panning doesnt seem to function. Is there anything in need to tweak?

thanks!


Oh right, I forgot about that. One of the conditions changed in a Construct update.
https://drive.google.com/open?id=0B-xiq ... 0xDel9TRHM try this new version.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Jul 17, 2017 11:45 pm

@99Instances2Go - In you example, if I change the mouse events and expression to touch expressions, I get this strange thing happening, when you start the touch, so simply tap, the BG jumps towards the right for some reason. Any ideas how to make touch work the same way as mouse input?

thx
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Mon Jul 17, 2017 11:52 pm

@99Instances2Go - seems to only happen on device though.
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Tue Jul 18, 2017 1:56 pm

Yeah well, touch has it own and better expressions.
https://www.dropbox.com/s/ysqzj79la09vl ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jul 18, 2017 3:36 pm

@99Instances2Go - Thank you very much for taking the time and effort to help me solve this issue and to put together that capx! you've taught me a lot these past few days from your examples!
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 40 guests