Scaling Layout Per Number of Objects?

Get help using Construct 2

Post » Thu Aug 02, 2012 10:41 pm

Hey guys I am trying to figure out the math behind scaling the layout to make all objects visible in the screen. Take a look at my capx to play with the cats.

CAPX
B
32
S
9
G
3
Posts: 275
Reputation: 8,063

Post » Fri Aug 03, 2012 1:47 am

I got to the part where I need to make it scale and suddenly realised I have no idea what I'm doing.jpg

It now scrolls half way between the cats furthest apart though.

it's a start I guess

https://dl.dropbox.com/u/53374990/Cats.capxkeepee2012-08-03 01:47:59
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Aug 03, 2012 12:04 pm

My sister would get a kick out this game.
Here's the math worked out:
http://dl.dropbox.com/u/5426011/fixed/KSLR_cats.capx
notes:
* all the cats are looped through to find the highest.
* lerp is used for a smooth transition.
B
79
S
24
G
55
Posts: 4,755
Reputation: 41,273

Post » Fri Aug 03, 2012 12:52 pm

Oh snap awesome! I just expecting a quick answer but you guys went above and beyond. Thanks R0J0hound you are lord of the CAPX. that is exactly what I was trying to do. Going to figure out exactly what is going on with the mathematics now. Cheers. Will keep you posted on cat stacking game.
I think you will have to stack them to a certain point to get a fish or something
B
32
S
9
G
3
Posts: 275
Reputation: 8,063


Return to How do I....?

Who is online

Users browsing this forum: Megavolt, selaus and 0 guests