0 favourites
  • 6 posts
  • Hello,

    i have a little problem with my background. In my "Menu" layout i have moving clouds in the background.

    It´s a sprite wich i move 2px every tick. When i click the startbutton the game loads a new layout which looks basicly the same and the clouds start moviing from their original position.

    Is there a way how i can say my clouds on Gamelayer to start where teh Menuclouds stopped?

    Thank you in advance


  • Just to clarify, is this one single sprite of a cloud or is this many sprites of single clouds that move? I have a way to do it with sprites and global variables but it gets convoluted if you have lots of objects. This might be better to do with an animation?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It´s one sprite that moves.

    You can see a version of the game here:

  • Make two global variables CloudPosX and CloudPosY that every tick store the CloudSprite.X and CloudSprite.Y. On loading the second layout, set Cloud position (CloudSprite.x=CloudPosX, CloudSprite.y=CloudPosY). That works although there could be a simpler way. REMEMBER to include Event sheet 1 (the one with the global variable) on the second layout's event sheet.

  • You are brilliant! Thank you so much. I pushed that problem away and away and now you fixed it.

    I´m so happy. But what do you mean with include event sheet 1?

  • No problem. If you have variables on Event Sheet 1 linked to Layout 1, they won't work on Layout 2 unless you 'include' Event Sheet 1 on Event Sheet 2. This is because they are separate by default, however you may have the one event sheet linked to all layouts which is also fine. You can do this by right clicking the event sheet and selecting 'include event sheet'.

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