How do I on every start of game the background change !!!!

0 favourites
  • 6 posts
From the Asset Store
40 ambient sound loops. A wide selection of looping ambient sounds for different locations.
  • hi,

    i just want to do this

    on every start of game (every start of first layout) the back ground change (but stil same in other layout and dont change)

    for exemple i have 3 background

    welcome layout , play layout , end layout

    on every start of welcome layout the background change and keep it on other layout

  • any help please ?

    thanks in advance

  • That all depends on if you want the game to randomly choose the image each time, or if you want it to choose the background in a specific order.

    If you want to make sure it specifically cycles through each background in a specific order you will need to store the last bg used in a variable on the computer and update it each time the game runs. If you do this, you would have an event on start of layout to load the information and select the next bg in the sequence.

    If you just want a random background (and this is the easier solution) you would just need to create your background objects, and use the random(N) function to decide which to use.

    In both scenarios, you would use a global variable contained in an event sheet, which all scenes had access to, to store the background you have currently selected. You would set this variable on the first scene and and all the other scenes would just reference it to properly set their bg.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you using 1 sprite for all background, or 3 sprites?

    If you are using 3 - you should merge them all into one (using different frames for the same animation).

    And now - just change the animation frame when game starts/ends.

  • i would like that change randomly

    Erez

    good idea about animation

    but i dont know how to set it !!!!

  • Check this

    [attachment=0:krku72md][/attachment:krku72md]

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