How do I make levels

0 favourites
  • 11 posts
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • How do i make more than 10 levels just in one or two layout

  • The most obvious way that springs to mind would be to store your levels in a separate file - .txt, .xml, .json etc - and parse the values, maybe into an array, and create the level based on the array.

  • What is steps to do that

  • Make new layouts called Level 1, Level 2 etc but make sure to select "Don't Create Event Sheet". Next Right click on event sheet to create on call it "Level Event Sheet" This is where you will store your main game code. Now go on to each of your level layouts and in the properties panel under Event Sheet select Level Event Sheet. Next create the actual look of your levels and code in the correct places. Next create a global variable called "OnLevel" and create an object in your level layouts call it "EndBlock" Create an instance variable attached to it and call it Level (initial value will be the level it's on). Next go in to your event sheet and use the following event: Player on collision with end block - go to layout (by name) ""Level " & EndBlock.Level + 1" Ok now make a sub event for that event: If EndBlock.Level = OnLevel - Then add 1 to OnLevel. Next create a new layout with event sheet. this will be the level selector. Make it look how you want with the same amount of numbers as levels (Make all the numbers the same object just use seperate animations and program them to play at correct times and create instance var called Level). And in the event sheet (for level selector) say: On touch LevelSelectNumber and LevelSelectNumber.Level is = or < OnLevel - go to layout (by name) ""Level " & LevelSelectNumber.Level" That is how I make Levels.

  • You could, provided you have the pro version, store the levels as a layer each and just set them to visible/invisible while also grouping the events for each level and activating/deactivating them.

    So when you hit level two you hide the level 1 layer, show the level 2 layer and than on the event sheet you disable the level 1 group and than enable the level 2 group.

    Although it may get a bit messy. Zenox and Vedal have a much more efficient solution.

  • Not trying to confuse you even more, but what might come in handy are groups.

    Groups can be activated and deactivated.

    If you use a group for level-specific events (for example positioning of the sprites) you can have the game specifics always active and just toggle the groups on and off depending on the level.

    Starting the group with a trigger once event would in this case allmost work like an on start of layout (Ofcourse in this case better called "on start of level")

  • what to do ?

  • Do you already have a level completed?

    Maybe even two?

    Your question isn't very clear and not knowing how much experience you have in working with Construct2, it's not easy to give an answer that is sure to help you..

    If you could provide a capx or explain better what it is exactly you don't know how to do, I think the answers would help you more..

  • I have made simple game already so i wanna know how to make more than level as a whole (generally)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you would like to create a second level in the same way you did the first, the easiest option would be creating a new layout for it.

    If you really want to do it on the same layout, the best way would be to place/create all your objects/assets in your "on start of layout" or through a function.

    The coordinates and all other relevant information could be stored in an array (internal or external through Ajax)

    Using groups as I mentioned above would make it easy to have this placement different per level.

    Activating group level1 to create the objects where they should be in level1, Activating group level2 to create the objects where they should be in level2.

    It's impossible for me to be more specific without knowing anything about your game.

  • Thank you all

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