How do I scale an object with its Y value between 2 points

Get help using Construct 2

Post » Tue Oct 06, 2015 6:08 am

I've been using a formula to scale an object with its Y value but I would like to know how to do it for a specific area on the game screen.

The only time I want the object to scale is when it moves from a Y value 200 to a Y value 450. I would like to scale my object up from its initial scale of 0.3 (set On Created), to a scale of 2.
B
69
S
24
G
8
Posts: 76
Reputation: 8,408

Post » Tue Oct 06, 2015 7:26 am

I have made an example for you https://drive.google.com/open?id=0B_ZRh ... EpxMVc3bjg
I know how it works, but I struggle with explaining. I hope one can figure it out or others can explain it to you :S
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,370

Post » Tue Oct 06, 2015 7:52 am

@ikke2902 Thank you very much for taking the time to do that. It works really well and I am sure this will come in handy for several people here.

I just have one other question - do you know how to scale the same object based on its distance to a Player object?
So when its position equals the player objects its scale will be 2 and when its position is say 450 pixels away its scale is 0.3.
B
69
S
24
G
8
Posts: 76
Reputation: 8,408

Post » Tue Oct 06, 2015 9:48 am

Here it is, it looks quite beautifull :D
https://drive.google.com/open?id=0B_ZRh ... FdndWhFRWc
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,370

Post » Tue Oct 06, 2015 5:16 pm

@ikke2902 Thank you again ikke. It is that unlerp line of code that I am not understanding. I'll have to read up on it a bit more. :P
B
69
S
24
G
8
Posts: 76
Reputation: 8,408


Return to How do I....?

Who is online

Users browsing this forum: Construct Monkey, David181, luckyrawatlucky and 2 guests