Simple re size sprite smooth loop?

Get help using Construct 2

Post » Fri Mar 22, 2013 12:13 pm

I can not resize a sprite, with smooth motion and repetitive as in GIF attachment in this post. All I've got is this:
https://dl.dropbox.com/s/gyji37mcvhc99ix/Ball.capx?token_hash=AAG5MxoxrHY6p_3UjFMr9T36X6RcqJYFb4MKxht2vPPdcg&dl=1
Only grows to infinity. I want a loop of 80px to 90px eg and smooth movement .. :( Please help.Excuse my English.
B
6
Posts: 24
Reputation: 774

Post » Fri Mar 22, 2013 12:51 pm

I gave your sprite an instance boolean variable called growing. Set growing to true when width is 80px or below, and set growing to false when it's 90px or above.

Every tick, if growing is true, increase size. If it's false, decrease size.

Updated capx.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Fri Mar 22, 2013 1:23 pm

Thank you very much!! is exactly what I needed. :):)
B
6
Posts: 24
Reputation: 774

Post » Fri Mar 22, 2013 1:26 pm

You may also be interested in the Sine Behavior, which would produce a similar effect.

Capx with the effects side by side.
B
44
S
13
G
7
Posts: 338
Reputation: 10,379

Post » Fri Mar 22, 2013 1:29 pm

@zatyka thanks for sharing that. I've never actually used the sine behaviour before, believing it was restricted to movement only as seen in the platformer template.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Sat Mar 23, 2013 10:45 am

@zatyka Thank you very much!! movement is smoother still, it's great! @Geometrix code for me to do other things served also as a laser beam that also needed, greetings and thanks for your help!!
B
6
Posts: 24
Reputation: 774


Return to How do I....?

Who is online

Users browsing this forum: HugeCube, imnotspecial, tomi71, totoe and 19 guests