How do I transform an object smoothly

Get help using Construct 2

Post » Sat Sep 24, 2016 2:20 pm

Hi,
How can I transform an object/sprite smoothly? (like growing a button or rotating smoothly)

Thanks!
B
6
S
1
Posts: 56
Reputation: 548

Post » Sat Sep 24, 2016 7:24 pm

Increment by dt every tick is a general answer.

Set Sprite scale to 1+dt
Set Sprite angle to Sprite.Angle+dt

Use a multiplier of dt to change the rate.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Sat Sep 24, 2016 7:46 pm

Thank you!
Can you help with one more thing?
how do I make smooth opacity fade?
B
6
S
1
Posts: 56
Reputation: 548

Post » Sat Sep 24, 2016 8:28 pm

Same thing. Set opacity to sprite.opacity-dt

If you want to constrain it so it doesn't go negative, you would do max(0,sprite.opacity-dt)

Alternatively, use the fade behavior.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Sun Sep 25, 2016 2:34 pm

Thanks @oosyrag :)
B
6
S
1
Posts: 56
Reputation: 548


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests