How do I increase sprite size with movement?

  • 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?

  • 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 :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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....

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)