Scale Behavior

Get help using Construct 2

Post » Tue Dec 27, 2011 10:56 pm

I'm new to construct 2
How do I scale objects over time. There is a behavior for the in Classic I've seen a plugin for it. Will there be a scale behavior plugin for C2
B
3
G
1
Posts: 3
Reputation: 631

Post » Wed Dec 28, 2011 12:57 am

You could look up the lerp() function.

Or simply - every tick, object.setsize - object.width +1, object .height +. 1
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Wed Dec 28, 2011 1:41 am

How exactly do you want to scale the object? If you want an in and out effect, you could use the Sine behavior, for example.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed Dec 28, 2011 1:52 am

Well I want to scale one object compared to another object by percentage

Example- if objA scaled to 50% then scale objB 40%

Just trying to find a quick way to scale a lot of objects different at Percentages at the same time.
B
3
G
1
Posts: 3
Reputation: 631

Post » Wed Dec 28, 2011 4:16 am

Create an instance variable for objA and objB called 'scale' with default 1.0
[code]
System: Every tick
   -> objB: set scale to objA.scale*your_conversion_formula
   -> objA: set size to self.ImageWidth*self.scale,self.ImageHeight*self.scale
   -> objB: set size to self.ImageWidth*self.scale,self.ImageHeight*self.scale[/code]
should work fineYann2011-12-28 04:16:59
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Dec 28, 2011 2:33 pm

Thanks everyone for the info I will give them a try
B
3
G
1
Posts: 3
Reputation: 631


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Lordshiva1948 and 16 guests