How do I MAke the BG image change size while game running?

0 favourites
  • 7 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hi,

    I want my BG to slowly grow in size whil the layout runs. Nothing major...very subtle but needs to run for 120 seconds.

    Any ideas?

    Thanks

  • No one?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Every X seconds

    -> set bg.width to self.width+1

    -> set bg.height to self.height+1

    That's the simplest way to do something like that... it becomes more complicated if you want to maintain aspect ratios and stuff like that, but for simple explanation you just want to change the width and height every X seconds perhaps?

    ~Sol

  • oh I see what you are saying. Thanks I'll give it a try. It is for the title screen so it is not 100% necessary I just think it would add a little the over screen...vs the static BG.

  • You can add the sine behavior to the background sprite. Set the movement of the sine to: "Size" , set magnitude "50" or whatever you want (you can experiment) and set the period to 240 (120x2) and see how it goes.

  • Every X seconds

    -> set bg.width to self.width+1

    -> set bg.height to self.height+1

    That's the simplest way to do something like that... it becomes more complicated if you want to maintain aspect ratios and stuff like that, but for simple explanation you just want to change the width and height every X seconds perhaps?

    ~Sol

    This appears to add it and then take it away. T give like a shake kind of effect.

  • You can add the sine behavior to the background sprite. Set the movement of the sine to: "Size" , set magnitude "50" or whatever you want (you can experiment) and set the period to 240 (120x2) and see how it goes.

    Had to bump magnitude up to 500 but see some growth...editied down to 250 and looks good...i think this will do the trick Thanks!

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