Zooming issue

Get help using Construct 2

Post » Tue Mar 25, 2014 8:31 am

Hi everyone,

This is what I want to achieve. When I press the button, the window will zoom out until it reaches either the layout's width or height, making sure it shows only the objects in the game. But I am not sure how to determine or ensure that the zoom does not go over the height or width that exposes the outside of the layout.

https://www.dropbox.com/s/iqqjk4b3d5plw0e/ZoomOutExample.capx

If you open the above capx, you will understand what I mean. When I click the button, it zooms out exposing parts that are not supposed to be in the game.


Would greatly appreciate any help. Thanks guys!
B
45
S
23
G
31
Posts: 687
Reputation: 20,600

Post » Tue Mar 25, 2014 10:56 pm

I didn't open your CAPX but I think this might help, it's something I employ in most of my games

Image
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Wed Mar 26, 2014 3:54 am

@emoaeden thanks for helping. But what you are showing is how to zoom am I correct? Actually I've got that part done already. What I want is to make sure that the zoom doesn't go over the layout size, since it will shows the outside part of the game. emoaeden I do appreciate the effort!

Hopefully someone is able to help.
B
45
S
23
G
31
Posts: 687
Reputation: 20,600

Post » Wed Mar 26, 2014 4:56 am

Yahoo!! I just found a solution to what I am looking for.

For those who are interested, all I did was create a border sprite and placed tham on the layout borders, and make it invisible. Than when it is on screen, I just stopped the zooming. Haha so simple.
B
45
S
23
G
31
Posts: 687
Reputation: 20,600

Post » Wed Mar 26, 2014 9:24 am

Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Wed Mar 26, 2014 10:26 am

@emoaeden. Thanks for your capx. Unfortunately, I can't open it right now. I am using an older version, and I am on holiday, and am using my limited prepaid internet. Will definitely download and see your capx once I get back home!
B
45
S
23
G
31
Posts: 687
Reputation: 20,600


Return to How do I....?

Who is online

Users browsing this forum: nahima and 7 guests