How do I increase sprite size with movement?

Get help using Construct 2

Post » Tue May 15, 2012 9:10 am

Hi Guys,
Does anyone know how to scale up the size of a simple sprite as it moves?

For example if I do the following to move the sprite on the Y axis:

On Every Tick -> Sprite.Y+1

I'd like Sprite.Height to increase by 1

But if I do:

On Every Tick -> Sprite.Height + 1

It just grows every tick, and balloons right out of the whole screen.

Is there any way of increasing size in proportion to the distance travelled?
B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Tue May 15, 2012 12:05 pm

I figured it out - I had to set sprite scale proportional to Y.

Every tick -> Set Scale to Sprite.Y

I'm a little confused as to why
Every tick -> Set Sprite.Width to Y will just keep growing bigger and bigger?

Oh well at least scale works :)
B
34
S
8
G
3
Posts: 328
Reputation: 7,692

Post » Thu Aug 15, 2013 4:55 am

Every Tick is a Timing Function of the Engine..not a movement coordinate..so having Every tick means that every cycle of the Game code the sprite will do what you tell it to...
In your case..that meant growing 1 pixel 60 times a sec or so..:)

to scale by movement you would need to define either X or Y movement or both ..to correlate to the Scale of the sprite....
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
29
S
11
G
8
Posts: 312
Reputation: 7,333


Return to How do I....?

Who is online

Users browsing this forum: Colorfish and 4 guests