How do I Resize Several Objects Together?

Get help using Construct 2

Post » Thu Jan 15, 2015 9:37 pm

It is interesting how is it possible to resize a group of objects via events just like when you select several sprites and hit Enter in the editor?
B
80
S
23
G
6
Posts: 240
Reputation: 7,761

Post » Thu Jan 15, 2015 10:28 pm

You can put the objects into a family and then resize the family in one event line.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,208
Reputation: 43,838

Post » Thu Jan 15, 2015 11:15 pm

Doesn't seem to help unfortunately, they still resize separately.
B
80
S
23
G
6
Posts: 240
Reputation: 7,761

Post » Thu Jan 15, 2015 11:29 pm

Try this example:
You do not have the required permissions to view the files attached to this post.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,208
Reputation: 43,838

Post » Fri Jan 16, 2015 5:38 am

Nah that's not what I need. Try selecting several objects in editor, hit "Enter" and then resize them, you'll understand what am I talking about.
B
80
S
23
G
6
Posts: 240
Reputation: 7,761

Post » Fri Jan 16, 2015 6:38 am

Something like this http://imgur.com/hjZwwYF
B
80
S
23
G
6
Posts: 240
Reputation: 7,761

Post » Fri Jan 16, 2015 7:50 am

If you want to do it right it would take some maths - finding the center among the objects, then finding a ratio of movement outward based on the size increase, etc. But is it needed in your case? Do you need to scale them just like in an editor, is the position different in each case? Or is it just the type of growing movement where the sprites grow and distance between them grows as well?
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Fri Jan 16, 2015 8:29 am

Both variants are good! Can you make some capx examples?
B
80
S
23
G
6
Posts: 240
Reputation: 7,761

Post » Fri Jan 16, 2015 12:11 pm

I'm not sure I understand the question, but if you want to scale a group of sprites as if they are disappearing into the distance then @Somebody is right, you need a bit of maths to scale them and their relative distances to/from a horizon-reference point.

You could also paste them into a Paster object and just scale that object instead. I'm on my phone so can't do an example until later...
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,208
Reputation: 43,838


Next

Return to How do I....?

Who is online

Users browsing this forum: lordsas and 58 guests