Increase object size over time

0 favourites
  • 9 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I've been stuck on this for the last couple of days, and I have searched through google and the FAQ, but to no success.

    Upon creation I want to increase the both the height and width of an object over a period of time, so say that it starts at 40 pixels width, and 80 pixels height, and 4 seconds it goes to be twice its original size, and we see it grow as if it was an animation.

    I'm not really sure where to start with this, I have tried several different conditions, but none seem to work.

    Thanks in advance.

  • Growing over time:

    Every tick > Set Height = Sprite.Height+1

    Every tick > Set Width = Sprite.Width+1

    Adjust growth speed/amount as needed

    And I made .capx example for you > LINK

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can do :

    system > every 4 seconds

    set sprite size to (self.width * 2, self.height *2)

    Might help maybe.

  • You can also use scale.

    I did a video a while back called Growing Buttons. You might be able to use something from it.

  • Do you have a capx for that video? A 9 minute tutorial seems a bit long.

  • Thanks for the feedback everyone :D.

    Unfortunately, I can't seem to make it increase in size when it is created. The idea is that similar to a grenade, when the grenade object hits the floor, it is destroyed and a new object is spawned, which is the object that increases in size.

    Every time the new object is created it doesn't increase in size, it stays the same, not sure what I am doing wrong :/.

  • Please post a .capx or screenshot of the events and I'm sure I can solve this.

  • dropbox.com/s/gl3ivcslqku18nh/Proto1.capx

    It is under the group bomb.

    I actually got it working, but for some reason I can't do it twice, or after a certain time period.

  • Yeah it doesn't like the Wait the second time round.

    Anyway, a quick fix for this is to add a condition under Every Tick > Laser 2 Is On-Screen. It checks Every Tick that Laser 2 has been created and then runs the growth.

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