How do I make zoom work with parallax (tried "everything")

Get help using Construct 2

Post » Thu May 19, 2016 3:47 pm

Chill man! It seems that Dropbox was foobarred a few days ago. Everyone's link was broken that I clicked on that day. I'll take a look at your capx.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"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
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Thu May 19, 2016 4:35 pm

Your answers are all in the manual:
https://www.scirra.com/manual/102/scroll-to

With special emphasis on bold:
The Scroll To behavior simply centers the view on the object with the behavior. It is a shortcut for the Scroll to object system action. However, it also provides a Shake action to shake the screen, and if multiple objects have the Scroll To behavior, it will center the view in between all of them.

If you need more advanced scrolling, e.g. limited to certain regions or following the player after a delay, scroll to an invisible object which you control through events.

To scroll, the size of the layout must be bigger than the size of the window, or the layout's Unbounded scrolling property must be set to Yes. Otherwise there is nowhere to scroll to and scrolling will have no effect.

Scroll To has no properties, conditions or expressions.


Like this:
Image
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"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
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Fri May 20, 2016 3:37 am

gumshoe2029 wrote:Chill man! It seems that Dropbox was foobarred a few days ago. Everyone's link was broken that I clicked on that day. I'll take a look at your capx.


Thank you. Actually I was calm as a wintermorning when writing that 8-) . Since dropbox was down I downloaded the whole thing also to mediafire, so there was a spare option. Anyway I´ll try that what you suggested. Hopefully it works. Thanks again for the effort! :)
B
29
S
15
G
17
Posts: 137
Reputation: 10,848

Post » Fri May 20, 2016 3:49 am

Tried it. It didn´t work as expected but when I change to the MAIN layer parallax to 100, 100 and scale rate 100 it works perfectly. It just seems that when those values are different the zoom always goes offset to the sprite which has the scroll to behaviour on it.

But I am happy with this. I will also change my layoutsize to larger as you kind of suggested even though it didn´t solve the problem. I was a bit scared of making it so large but it works nicely. Thanks for guiding me into the right direction.

edit: Actually just did try to take the unbounded scroll to NO and it didn´t work so that was actually a very important thing which made it finally work when I changed it to YES! Special thanks for that. :)
B
29
S
15
G
17
Posts: 137
Reputation: 10,848

Previous

Return to How do I....?

Who is online

Users browsing this forum: luckyrawatlucky and 25 guests