Suggestion: Layout behaviour

0 favourites
  • 14 posts
From the Asset Store
Skin it
$20 USD
A skin plugin and behavior to add a skin system in your game.
  • Ashley I know it's only a two man team and you guys work hard, so I'm not expecting miracles with this suggestion. I just thought I'd put the idea forward. Here goes...

    I have worked out how to use one event sheet for all my levels by having a global variable called 'LevelLayout' and every time the goal is reached I add 1 to the global variable and the same if I want to restart the current level. So currently my event sheet looks like this:

    <img src="http://dl.dropbox.com/u/44025915/LayoutHelp.png" border="0" />

    However, I was thinking, if C2 could internally assign numbers to each layout itself, in the order that they appear in the layout browser, then it would be much neater to simply have one action. For example:

    <img src="http://dl.dropbox.com/u/44025915/Layouts.png" border="0" />

    So...

    On object collision with Goal -> Proceed to next layout

    On pressing 'restart' -> Restart current layout

    Does this make sense?

  • You can already specify a layout to go to by name, which would solve your problem. In your case for example you would just type in goto '"Level" & LevelLayout' and it would skip to the correct level =)

  • I've looked at this option but couldn't quite figure it out :(

    So if I wanted to use the same event sheet for all my level layouts, how would that look?

    So...

    Ball on collision with goal -> (how do I go to the next level, relative to the current one?)

  • In your case it would be:

    Ball on collison with goal --> * Add 1 to LevelLayout

                                    * Go to layout - "Level" & LevelLayout

    If that doesn't make sense I can make you a capx if I have time =)

  • I'll have a play around with it now. Would it be a similar a thing to restart the current layout then? Just without adding the 1 to the variable?

    On touch object 'Restart' --> * Go to layout - "Level" & LevelLayout

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, let me know if it does't work for some reason!

    And indeed, it would be exactly the same except for the adding =)

  • You know what, I think I've got it :) Thanks!!!

    It was starting to get a little tedious as I got up to levels 16+. My event sheet was a mess!

  • You're welcome =) Glad you've managed to get it working, this way does save a lot of effort!

  • Moved to C2 general.

    Those infos shouldn't be buried/get lost in the open topics.

  • Kyatric You could add this to yours "[How do I]Frequently asked questions" list.

  • Added in the "Layouts" section.

  • Thanks for sharing!!! <img src="smileys/smiley32.gif" border="0" align="middle" />

    Now, after a few tweaks, this is what worked best for me:

    I defined a Global Variable: LevelLayout

    On Start of Layout ---> Add 1 to LevelLayout

    Event --> Go To "Layout "&LevelLayout

    Important note which may work for some designers:

    NEVER reset your global variables when using end of layout. Setting specific values to each variable may be a more effective solution.

  • Hi Kyatric

    I had the same question!!

    I am creating an Isometric game where the Level scrolls downwards, I create tiles at the top of the screen and destroy them when the exit the screen below. is

    I have written all my game logic in a single Layout - Platform and background(environment) Scrolling , Collision detection, Enemy logic and other standard game events.

    Now my question is, when the player reaches the End I want to load a new set of Tiles and Environment image (eg: from Desert -> Snow -> Jungle). What is the most efficient way to do this?

    I read that C2 loads required images/objects only when the Layout is loaded. So how to I group my Tile images?

    Can I create a common Platform Sprite and have each Level images grouped under various Animations?

    Will C2 still load all the level images into Memory even if I am not calling the animation?

    Or Do I have to create separate Sprite objects for each Level?

    Could you point me to a Thread/Tutorial that explain this in detail? The Search option is throwing too many things at me and nothing seems relevant.

  • SamRock: In the tutorials section and the how do I FAQ looks for the keyword "Isometric".

    Otherwise, you should probably make a new thread to ask specifically your question.

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