How to set pieces randomly in the level.

0 favourites
  • 5 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hello everyone.

    I am creating a game vertical infinite runner type game. In this I have created this random set pieces



    I have created many like this and at start you will spawn at first image and as you move on the second image appear and it is smooth transition and so on it goes. every time it is randomly selected.

    Can anyone help me??

    Thank you.

  • Sorry I actually don't know how to add image,therefore i have put the url to dropbox and you can see the image and

  • Create a bunch of events that relate to a variable number, i.e. if 1 then spawn this pattern, if 2 then spawn this pattern. This could be in one event, a function that you pass a variable parameter through. Then every x seconds or whatever timing is required for spawning the next set piece you can use 'choose' i.e. choose (1,2,3,4) or 'random' i.e. random (0,5) to pick a random number which you can then put through the function and spawn the relevant set piece.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks but I need them to scroll down as you move forward. In buildbox you have to create a level as different scene and as you move forward the system automatically select any scene and it looks like random and it is smooth. In the game color switch you can every time new obstacles are spawn I want the same system or mechanism.

    Can you help me.

  • Yes the logic I mentioned will randomise what spawns, although there are many ways to do it and tweak it. Scrolling down as you move forward is a separate thing and easy to do, you could have everything +Y constantly if it is automatically moving or have it so that everything in the level moves down as the player moves up.

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